Bug 406251 - 3.15: Auto select version for a product on enter_bug.cgi if the version is marked current in the versions table
3.15: Auto select version for a product on enter_bug.cgi if the version is ma...
Product: Bugzilla
Classification: Community
Component: Bugzilla General (Show other bugs)
All Linux
high Severity medium (vote)
: ---
: ---
Assigned To: David Lawrence
2 hours
Depends On:
Blocks: RHBZ30UpgradeTracker
  Show dependency treegraph
Reported: 2007-11-30 11:58 EST by David Lawrence
Modified: 2013-06-24 00:17 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-04 14:22:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Version sort key patch for rh_bugzilla_2_18 (54.03 KB, patch)
2007-12-21 11:04 EST, David Lawrence
no flags Details | Diff

  None (edit)
Description David Lawrence 2007-11-30 11:58:23 EST

Function Requirements:
Comment 1 David Lawrence 2007-12-21 11:03:26 EST
Originally https://engineering.redhat.com/rt3/Ticket/Display.html?id=16815

Created patch that illustrates how we can do the sortkey instead of the current
column proposed before.

The versions will be order by sortkey and placed in data/versioncache as it is
now. enter_bug.cgi will continue to auto select the last in the list if no
default is given as before. I have added a redhat/update_versions_sortkey.pl
script that will update the sortkeys in the versions table based on the order of
values for each product in the script. We can edit it to out liking and then
update when needed.

There is also a fix included for Bugzilla/Ajax.pm. In it I was originally
sorting the versions there as well regardless of how they are listed in
data/versioncache. So I removed the sorting in getVersions() so that they
display in the UI properly. I still sort though if they are getting all of the

I also updated editversions.cgi to allow editing of the sortkey values through
the UI.

When/if this is pushed to live, we will need to coordinate with Meethune/Matt on
how best to get the current version list from the live database so that it can
be sorted and applied later.

1. Get sysadmin to run the update_versions_sortkey.pl script on the live system
and catch the current version output to a text file which they will send to us.
2. Append the version data to the __DATA__ section of the
update_versions_sortkey.pl script
and then edit the data to put the versions into the proper chronological order.
3. Have sysadmin alter the versions table to add the new sortkey column.
4. Give the updated script to sysadmin to re-run on the live server which will
use the data in __DATA__ to update the sortkey values in versions.
5. Update the Bugzilla code package on live server to have the system start
using the new sorting mechanisms.

Comment 2 David Lawrence 2007-12-21 11:04:14 EST
Created attachment 290241 [details]
Version sort key patch for rh_bugzilla_2_18
Comment 3 David Lawrence 2007-12-21 12:37:40 EST
LOC Estimation for 3.0 port:

Adding 30% due to editversions.cgi being very different and will
need extra work for porting.

checksetup.pl or Schema.pm: 2
globals.pl: 2
editversions.cgi: 75
Bugzilla/Ajax.pm: 25
redhat/update_versions_sortkey.pl: 905
selenium test case to verify proper version selected by default: 2 hours

LOC Total: 1010 + (1010 * .30) = 1312

Comment 4 David Lawrence 2008-02-04 14:22:09 EST
I think this is something we will not need to worry about. We do not currently
support this in 2.18 and upstream is now using Sort::Versions which does a
pretty good job of sorting and enter_bug.cgi will automatically choose the last
version in the list which should be the highest. We will reopen this if there is
substantial call for it but right now there are more important things to work on.


Note You need to log in before you can comment on or make changes to this bug.