Page 1 of 1

Need some help in creating custom report.

Posted: Thu Jul 14, 2011 9:01 am
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.

Re: Need some help in creating custom report.

Posted: Sun Jul 17, 2011 7:50 pm
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.

Re: Need some help in creating custom report.

Posted: Wed Jul 20, 2011 3:21 pm
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

Re: Need some help in creating custom report.

Posted: Thu Jul 21, 2011 11:56 am
by pagalavan
Thanks TurboPT...

i will check and let u know.