sorting order of target milestone is not preserved

RESOLVED DUPLICATE of bug 173583

Status

()

Bugzilla
Query/Bug List
RESOLVED DUPLICATE of bug 173583
15 years ago
5 years ago

People

(Reporter: Artur Zgoda, Assigned: Artur Zgoda)

Tracking

2.16.1
x86
Windows 2000

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

15 years ago
After the first entry to query.cgi the sorting order of "target milestones" is
correct (according to sort keys), but after choosing any product "target
milestone" select box is reloaded and the order of the values there is not
according to sort keys anymore.

Steps to reproduce:
1) create a dummy project "dummy"
2) create two target milestones:
   - "target a" with sort key 2
   - "target b" with sort key 1
3) enter query.cgi page (target milestones are listed in order: "target b",
"target a")
4) click on the project "dummy" (target milestones are listed in order: "target
a", "target b")
Assignee: endico → nobody

Comment 1

14 years ago
Created attachment 141150 [details] [diff] [review]
Patch to query.cgi (v2.17.6) to fix problem

Warning: this is my first patch submitted to bugzilla.	I'm not certain I've
got the proper format.
Attachment #141150 - Flags: review?(mattyt-bugzilla)

Comment 2

14 years ago
I experienced this problem in 2.17.6 in our local installation.  It appears that
the code that is initializing the per-product list of target milestones is
unnecessarily doing a sort (near line 265 in 2.17.6 version of query.cgi). 
Removing this sort will cause the target milestones to be stored in the order
they appear in %::target_milestone.
format of the patch looks good (it's diff -u).  I know Matty had ideas for the
milestone stuff, so I'll let him judge if this is doing the right thing.
Assignee: nobody → Artur.Zgoda

Comment 4

14 years ago
Yeah, but the problem is that when reinsering the items into the select box (for
instance, when you control-click another product) they go in out of order,
because of the internal sorting done in the query.cgi JS.

Gerv has a plan to fix this over at bug 173583, though he hasn't had the guts to
try it yet. I'm duping this bug over to that one just because it has more
relevant discussion, IMO. Ken, if you have some time free, we could really use
some help to get this done the right way.

*** This bug has been marked as a duplicate of 173583 ***
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE

Comment 5

14 years ago
Comment on attachment 141150 [details] [diff] [review]
Patch to query.cgi (v2.17.6) to fix problem

For the record, this breaks for multiple selections in the product list.
Attachment #141150 - Flags: review?(mattyt-bugzilla) → review-
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.