Need some help in creating custom report.

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
pagalavan
Advanced user
Posts: 17
Joined: Tue Apr 12, 2011 8:14 am

Need some help in creating custom report.

Post by pagalavan »

Following are the steps i followed.

1.Copied resultsGeneral.php and also tpl into a new file.
2.Added new report in custom-config.php.

Everything works fine..

Now my requirement is to modify resultsGeneral.php as per my needs.

From the file i am not able to get the build name.I want all the build names from the selected testplan.

Can anyone help me?

just a single line help... just guide me.. wll develop and i wll contribute also.
TurboPT
Member of TestLink Community
Posts: 343
Joined: Sun Dec 10, 2006 4:51 am

Re: Need some help in creating custom report.

Post by TurboPT »

pagalavan wrote: ...I want all the build names from the selected testplan.

Can anyone help me?

just a single line help... just guide me.. wll develop and i wll contribute also.
It looks like [and I have NOT tried this, just glancing at the code] that it could be possible to use another function of the testplan class that retrieves all the builds for a given testplan.

The function is called get_builds_for_html_options(), and it at least needs the provided testplan ID. Technically, it is a paired list of build id and names, typically used with a combo-box or list box.

Perhaps something like this in the file:

Code: Select all

// These first two statements are already present in the file.
$args = init_args();
$tplan_info = $tplan_mgr->get_by_id($args->tplan_id);

// Get the build id and names for the testplan
$tplan_builds = $tplan_mgr->get_builds_for_html_options($args->tplan_id);
...and then retrieve the names from the $tplan_builds data where needed.

So, have a look at the function [as it does have other arguments that might be useful] to see if this might help achieve the desired task.
Rorke
TestLink user
Posts: 6
Joined: Thu Jul 07, 2011 1:03 pm
Location: UK

Re: Need some help in creating custom report.

Post by Rorke »

OK - I can't seem to operate this forum, so apologies if this is wrong etiquette,
I want to create a specific output showing 'parent' -> 'child' relationships, re-ordering to put children and grandchildren and then their tests directly beneath, regardless of order in tree.
(Also, all my PMs are in Outbox and not Sent - don't know why)
Any ideas that don't contain the phrase RTFM?
Thanks

Simon
Rgds
Simon
pagalavan
Advanced user
Posts: 17
Joined: Tue Apr 12, 2011 8:14 am

Re: Need some help in creating custom report.

Post by pagalavan »

Thanks TurboPT...

i will check and let u know.
Post Reply