Bug 406251

Summary: 3.15: Auto select version for a product on enter_bug.cgi if the version is marked current in the versions table
Product: [Community] Bugzilla Reporter: David Lawrence <dkl>
Component: Bugzilla GeneralAssignee: David Lawrence <dkl>
Status: CLOSED DEFERRED QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 3.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: 2 hours
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-04 19:22:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 406071    
Attachments:
Description Flags
Version sort key patch for rh_bugzilla_2_18 none

Description David Lawrence 2007-11-30 16:58:23 UTC
Description:


Function Requirements:

Comment 1 David Lawrence 2007-12-21 16:03:26 UTC
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
versions.

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 16:04:14 UTC
Created attachment 290241 [details]
Version sort key patch for rh_bugzilla_2_18

Comment 3 David Lawrence 2007-12-21 17:37:40 UTC
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 19:22:09 UTC
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.

Dave