Closed Bug 177110 Opened 22 years ago Closed 21 years ago

sorting order of target milestone is not preserved

Categories

(Bugzilla :: Query/Bug List, defect)

2.16.1
x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 173583

People

(Reporter: Artur.Zgoda, Assigned: Artur.Zgoda)

References

()

Details

Attachments

(1 file)

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
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)
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
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
Closed: 21 years ago
Resolution: --- → DUPLICATE
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.

Attachment

General

Creator:
Created:
Updated:
Size: