Closed Bug 681635 Opened 15 years ago Closed 7 days ago

Advanced Search: Selecting Multiple Products with the same Version shows duplicate Versions in UI

Categories

(Bugzilla :: Query/Bug List, defect)

4.0.2
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: cfolts, Assigned: Logan)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20100101 Firefox/6.0 Build ID: 20110811165603 Steps to reproduce: Recently upgraded from version 3.6 to 4.0.2. Went to Advanced Search Selected 2 Products that share version names. Product1 - Dev, Prod, System Test Product2 - Unspecified, Dev, Prod Test Actual results: Under the Version field it shows the following: Dev, Prod, System Test, Dev, Prod, Test This also happens on shared Components. Not all the versions are repeated for all combinations of Products. Sometimes only 1 is repeated even though they share multiple. Expected results: The Version field should show: Dev, Prod, System Test, Test
Thanks for your bug report. I'm unable to reproduce this. Perhaps it's a problem specific to your installation? I would suggest asking on the support-bugzilla mailing list, described here: http://www.bugzilla.org/support/
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
Blocks: 460693
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WORKSFORME → ---

This is reproducible in the current upstream code. js/productform.js::merge_arrays performs a two-pointer merge that assumes both input lists are already sorted case-insensitively. Product versions and target milestones can instead follow configured ordering, so a shared value at different positions can be emitted twice.

Bug 460693 tracks the BMO occurrence and now depends on this bug. A fix and regression test are being prepared to explicitly sort and de-duplicate the merged values.

Original bug (not a regression). merge_arrays() in js/productform.js — which does a two-pointer merge assuming both input lists are already sorted case-insensitively — dates essentially unchanged to this commit from 2004: cb2d1a0a9.

Affected branches: Present on 5.0.4, 5.2, harmony, and masterjs/productform.js and Bugzilla::Product::versions()/milestones() are logically identical (only perltidy/comment differences) on all four.

Where it should be fixed: This is a genuine bug fix, not a new feature or large refactor, so per the commit rules it qualifies on all branches:

  • harmony — fix here first (primary development branch): bugzilla/harmony
  • 5.2 — allowed as a bug fix; no schema change or large refactor required.
  • 5.0.4 — allowed as a bug fix (data-correctness issue, not merely cosmetic).
  • master — same bug-fix rules as 5.0.4; deprecated but no reason to exclude a pure bug fix.

Expect the harmony patch to need manual reformatting (spacing/tidy conventions differ) when back-ported.

Assignee: query-and-buglist → loganrosen

Comment on attachment 9632309 [details] [review]
[bugzilla/bugzilla] [4.4] Bug 681635: De-duplicate values in Advanced Search (#246)

The 4.4 branch is no longer supported. See the list in comment 4 for which branches this should be fixed on.

Attachment #9632309 - Attachment is obsolete: true

Comment on attachment 9632336 [details] [review]
[bugzilla/bugzilla] [master] Bug 681635: De-duplicate values in Advanced Search (#248)

Landed on master (5.3) :
https://github.com/bugzilla/bugzilla/commit/365d007426d8348e4f400270d666ce82b6ff55aa

Attachment #9632336 - Flags: merged+

Comment on attachment 9632308 [details] [review]
[bugzilla/bugzilla] [5.0.4] Bug 681635: De-duplicate values in Advanced Search (#245)

Landed on 5.0.4:
https://github.com/bugzilla/bugzilla/commit/5849118389e2d9fe9855c700b9e90ee9f23c59fe

Attachment #9632308 - Flags: merged+

Comment on attachment 9631444 [details] [review]
[bugzilla/bugzilla] [5.2] Bug 681635: De-duplicate values in Advanced Search (#244)

Landed on 5.2:
https://github.com/bugzilla/bugzilla/commit/0f87c06df8d6a7ef744f8ac00849d892101e3916

Attachment #9631444 - Flags: merged+

Comment on attachment 9632337 [details] [review]
[bugzilla/harmony] Bug 681635: De-duplicate values in Advanced Search (#184)

Landed on harmony:
https://github.com/bugzilla/harmony/commit/ffbdc927717b6a36cac699ac982433fd26286fb8

Attachment #9632337 - Flags: merged+

And that's everything. Thanks for the patches!

Status: REOPENED → RESOLVED
Closed: 15 years ago7 days ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 5.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: