JIRA currently has a report tab called 'Roadmap' available from it's product browser screen. The tab shows a list of issues that are assigned per target release and sorts the releases in order. It also shows a progress bar that has a percent of completion. The tab in Bugzilla's product browser should provide similar functionality. First getting a full bug count for particular target release, then listing the open bugs in a YUI paginated table. A progress bar to the right of each release would show the percent completion based on the open bugs / closed bugs.
Hi Dave, Under the Product browser we have the Components tab, under it there are the stats by component/version/milestone for the product, for example: https://bugzilla.redhat.com/page.cgi?id=browse.html&product=Red%20Hat%20Application%20Server%20Public%20Beta&bug_status=open&tab=by_component So the purpose of this bug is to add another section for the new field "Release"? so we would add it under the Components Tab under the Product Browser? or do we want an entirely separate Tab for it like the Duplicates, popularity? Thanks, Noura
Not really. The original idea was to have a new tab called Roadmap that list the current target releases for a given product and show a percentage bar showing the counts of how many bugs are completed for each target release. So for each target release it would look like Realease 5.6: [=================== ] 50% Complete (500/250) So the basic formula would be (total bugs attached to release 5.5/number of bugs closed for 5.5)/100 = percentage complete or something like that. To get a good example of how this needs to work check out: https://jira.jboss.org/browse/BRMS#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel Hopefully you can see that logged out. Dave
Created attachment 461287 [details] v1 for patch to add roadmap for product targetreleases This is a patch to add the roadmap tab to the Browse tab.. I haven't tested it yet.. . Noura
Created attachment 461540 [details] v2 of patch to add roadmap tab under browse tab Hi Dave, Attached is a patch to add the roadmap tab to the browse tab. it is working as describe,, listing all target_release for a selected product with 3 classifications: total bugs, open bugs, closed bugs.. I have tested the patch and it seems to be working successfully for me. cheers, Noura
Comment on attachment 461540 [details] v2 of patch to add roadmap tab under browse tab >Index: extensions/Browse/template/en/default/pages/browse.html.tmpl >=================================================================== >--- extensions/Browse/template/en/default/pages/browse.html.tmpl (revision 2285) >+ <div class="yui-skin-sam"> >+ [% FOREACH target_release = by_roadmap %] >+ <b>Target Release: [% target_release.release_name %]</b> >+ <div id="bug_releases"> >+ <table id="bug_releases_table" border="0" cellspacing="3" cellpadding="0"> >+ <thead> >+ <tr> >+ <th>Name</th> >+ <th>Count</th> >+ <th>Percentage</th> >+ </tr> >+ </thead> >+ <tbody> >+ <tr> >+ <td><a href="[% target_release.bug_release_link_total FILTER html %]">Total [% terms.Bugs %]</a></td> >+ <td>[% target_release.total_bug_release FILTER html %]</td> >+ <td> </td> >+ </tr> >+ <tr> >+ <td><a href="[% target_release.bug_release_link_open FILTER html %]">Open [% terms.Bugs %]</a></td> >+ <td>[% target_release.open_bug_release FILTER html %]</td> >+ <td width="70%"> >+ [% INCLUDE bar_graph count = target_release.open_bug_release full_bug_count = target_release.total_bug_release %] >+ </td> >+ </tr> >+ <tr> >+ <td><a href="[% target_release.bug_release_link_closed FILTER html %]">Closed [% terms.Bugs %]</a></td> >+ <td>[% target_release.close_bug_release FILTER html %]</td> >+ <td width="70%"> >+ [% INCLUDE bar_graph count = target_release.close_bug_release full_bug_count = target_release.total_bug_release %] >+ </td> >+ </tr> >+ </tbody> >+ </table> >+ </div> >+ [% END %] For this we just need the one percentage bar showing the percentage completed. You can have text off to the side that has some simple counts. Example Release | Percentage Complete | Links | 5.4.0 | [================== 66% ] | 66 of 100 bugs have been closed | The numbers '66' and '100' can be linked to the proper bug searches. >Index: extensions/Browse/lib/Queries.pm >+sub bug_release_link_total { >+ my ($product, $release) = @_; >+ >+ return correct_urlbase() . 'buglist.cgi?product=' . url_quote($product->name) . "&target_release=$release"; >+} >+ >+sub bug_release_link_open { >+ my ($product, $release) = @_; >+ >+ return correct_urlbase() . 'buglist.cgi?product=' . url_quote($product->name) . "&target_release=$release" >+ . "&bug_status=__open__"; >+} >+ >+sub bug_release_link_closed { >+ my ($product, $release) = @_; >+ >+ return correct_urlbase() . 'buglist.cgi?product=' . url_quote($product->name) . "&target_release=$release" >+ . "&bug_status=__closed__"; >+} These above are already in extensions/Browse/lib/Util.pm and do not need to be redefined here. >+sub product_targetrelease { >+ my $product = shift; >+ my $dbh = Bugzilla->dbh; >+ >+ return $dbh->selectcol_arrayref("SELECT DISTINCT target_release >+ FROM bugs >+ WHERE bugs.product_id = ?", undef, $product->id); >+} We should show all target releases in the table, not just the ones that have been assigned to bugs. Then in the table just show "No Bugs Found" or similar in the Links column. Also if we do all target releases you should be able to get the full list of target releases from Bugzilla::Product->releases instead of accessing the database directly. Looking good. Dave
Created attachment 463710 [details] v2 of patch to add roadmap patch for target releases Thanks for the review Dave. Attached is a new patch that has all your suggestions applied.. please let me know what you think. Cheers, Noura
Comment on attachment 463710 [details] v2 of patch to add roadmap patch for target releases Thanks Noura. >Index: extensions/Browse/template/en/default/pages/browse.html.tmpl + var column_defs = [ + { key:"release", label:"Release" }, + { key:"percentage complete", label:"Percentage Complete", sortable:false }, + { key:"links", label:"Links" }, + ]; Please add sortable:true to the release column and set the others to sortable:false. >+ <tr> >+ <td>[% target_release.release_name %]</td> <td>[% target_release.release_name FILTER html %]</td> >+ <td width="70%"> >+ [% INCLUDE bar_graph count = target_release.open_bug_release full_bug_count = target_release.total_bug_release %] count = target_release.closed_bug_release >+ </td> >+ [% IF target_release.total_bug_release > 0 %] >+ <td><a href="[% target_release.bug_release_link_open FILTER html %]">[% target_release.open_bug_release FILTER html %]</a> of <a href="[% target_release.bug_release_link_total FILTER html %]">[% target_release.total_bug_release FILTER html %]</a> bugs have been closed</td> Change target_release.bug_release_link_open to target_release.bug_release_link_closed and also change target_release.open_bug_release to target_release.closed_bug_release. The text should read as: "<total_closed_bugs> of <total_bugs> bugs have been closed" nit: divide this over a couple lines instead of one line >+ [% ELSE %] >+ <td>No bugs Found</td> Replace 'bugs' with [% terms.bugs %] in appropriate places. Nit: s/Found/found/ >Index: extensions/Browse/Extension.pm > use Bugzilla::Field; >+use Bugzilla::Milestone; Bugzilla::Milestone is needed? > use Bugzilla::Extension::Browse::Queries; > use Bugzilla::Extension::Browse::Util; >@@ -167,6 +168,20 @@ > if ($current_tab_name eq 'by_popularity') { > $vars->{'by_popularity'} = by_popularity($product, $bug_status); > } >+ >+ if ($current_tab_name eq 'by_roadmap') { >+ my $releases = $product->releases(); >+ foreach my $release_obj (@{$releases}){ >+ my %release_stats; >+ my $release = $release_obj->{value}; >+ $release_stats{'release_name'} = $release; >+ $release_stats{'total_bug_release'} = total_bug_release($product, $release); >+ $release_stats{'open_bug_release'} = bug_release_by_status($product, $release); >+ $release_stats{'bug_release_link_total'} = bug_release_link_total($product, $release); >+ $release_stats{'bug_release_link_open'} = bug_release_link_open($product, $release); >+ push (@{$vars->{by_roadmap}}, \%release_stats); >+ } >+ } Need to add the following to support the comments for the browse.html.tmpl template changes: $release_stats{'closed_bug_release'} = bug_release_by_status($product, $release, 'closed'); $release_stats{'bug_release_link_closed'} = bug_release_link_closed($product, $release); >Index: extensions/Browse/lib/Queries.pm >+sub bug_release_by_status { >+ my ($product, $release) = @_; Allow the bug status to be passed in as well my ($product, $release, $bug_status) = @_; >+ my $dbh = Bugzilla->dbh; >+ >+ my $extra = "AND bugs.bug_status IN (" . open_states() . ")"; And then change the query based on $bug_status my $extra; $extra = "AND bugs.bug_status IN (" . open_states() . ")" if $bug_status eq 'open'; $extra = "AND bugs.bug_status IN (" . closed_states() . ")" if $bug_status eq 'closed'; >Index: extensions/Browse/lib/Util.pm >+ bug_release_link_total >+ bug_release_link_open > ); Add another subroutine for bug_release_link_closed() Looks good Noura. Dave
I have pushed a test release containing this change to bz-web2-test.devel.redhat.com for testing purposes. It is ready for the JIRA folks to take a look and see what they think so far. Dave
Some examples: https://bz-web2-test.devel.redhat.com/page.cgi?id=browse.html&tab=by_roadmap&product=JBoss+Enterprise+Portal+Platform&bug_status=open https://bz-web2-test.devel.redhat.com/page.cgi?id=browse.html&tab=by_roadmap&product=JBoss+Enterprise+BRMS+Platform&bug_status=open Dave
Created attachment 463933 [details] v3 of patch to add roadmap tab for target releases Hi Dave, Attached is a patch with all changes you mentioned before. Thanks, Noura
Comment on attachment 463933 [details] v3 of patch to add roadmap tab for target releases Looks good Noura. I wonder if we should wrap all of this though in a Param('usetargetrelease') check so that if that is set to off, then none of this stuff appears. The RoadMap tab is not really useful of usetargetrelease is turned off. The other side of the question is whether we should even have the usetargetrelease param at all and just have it on all the time. I guess we can leave the param since we have one also for Target Milestone for now. Please update this patch in a way that this stuff is hidden when usetargetrelease is off. Thanks Dave
Created attachment 465222 [details] v4 of code to add roadmap tab for targetrelease Thanks for the review Dave.. Attached is a new patch that wraps up the roadmap code into usetargetrelease param, so if it is not on the tab will not appear.. I have committed the extra wrapping code to the target_release branch.. Cheers, Noura
Thanks for all of the work on this Noura. It should all be under the target_release branch in SVN. The next steps after this will be: 1. Finish testing to make sure there are no problems. 2. Schedule a time to commit this code to trunk and then push an updated package live. 3. Work with eng-systems to execute checksetup.pl to create the new fields and tables that are needed. 4. Work with Andrius, cward, etc. to migrate the old values to the new Bugzilla field. 5. Make sure the ACLs on the old custom field work with the new field. 6. Close this and the other relate bugs when everything is live. 7. Have Simon or yourself re-enable the code I commented out in the jira branch to work with the new target release field. Thanks Dave
I'm not seeing this as a tab after clicking browse, can you describe where I should be seeing this please
Hi trev, The reason why you can not see it is that a parameter needs to be set on to show the tab. I asked out sys admins to turn it on and you should see the tab once that is done hopefully sometime later on today. cheers, Noura
Is this a duplicate of bug 584949? I have to check however that this code works with the new target release code (bug 587798). Marking as ASSIGNED until I have done this.
Hi, This change is now on partner-bugzilla.redhat.com, and is due to be released as part of today's upgrade on the live bugzilla server. -- simon
Hello, This change was released into production approximately 4 hours ago, as part of Red Hat Bugzilla 3.6.5011. -- simon