Closed Bug 291539 Opened 20 years ago Closed 20 years ago

Flags get duplicated if multiple inclusions apply

Categories

(Bugzilla :: Attachments & Requests, defect)

2.19.2
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: bugreport, Assigned: LpSolit)

References

Details

Attachments

(1 file, 1 obsolete file)

If a Bug flag is defined to apply to All/All as well as a specific product, then it will appear twice in the show_bug page.
Blocks: rt-clean-up
*** Bug 292892 has been marked as a duplicate of this bug. ***
Attached patch patch, v1 (obsolete) — Splinter Review
Replace SELECT by SELECT DISTINCT. This way, we avoid flag type duplication due to multiple entries in the flaginclusions table. I think (hope) all other queries, including ones using flags count, are not affected by the addition of DISTINCT (untested) as they only use the flagtypes table or also use the flags table but with one value per flag type.
Attachment #182822 - Flags: review?(bugreport)
Attached patch patch, v1.1Splinter Review
Maybe a better comment: only the flaginclusions table causes flag type duplication, not the flagexclusions one.
Attachment #182822 - Attachment is obsolete: true
Attachment #182823 - Flags: review?(bugreport)
Attachment #182822 - Flags: review?(bugreport)
Flags: blocking2.20?
Target Milestone: --- → Bugzilla 2.20
2.19.x specific! 2.18.1 is not affected. Backing out the patch from bug 285555 fixes the problem. Adding dependency on it.
Depends on: 285555
Attachment #182823 - Flags: review?(bugreport) → review+
Assignee: attach-and-request → LpSolit
Flags: approval?
myk wants mkanat and joel on it. The patch on bug 285555 may have introduce some regressions: (22:58:59) myk: LpSolit: do you not think bug 285555 introduced a problem that should be resolved by modifying that bug's fix? (23:01:08) myk: LpSolit: seems like it would make sense to get the folks who fixed 285555 to look at the problem and help figure out the solution (23:01:41) myk: LpSolit: your patch seems to fix the problem, but it may also be papering over a more fundamental problem with the fix for bug 285555; or maybe not; it would be useful to know that (23:02:15) LpSolit: myk: did you receive the mail I sent you about this bug? (23:03:08) myk: LpSolit: yes, but we should involve the folks who fixed bug 285555 in figuring this out (23:04:37) LpSolit: myk: but you reviewed it ;) (23:04:37) myk: LpSolit: max and joel also participated (23:05:22) myk: LpSolit: yes, but joel and max worked with tomas to identify the problem and design its solution (23:05:55) myk: i just did code review and testing
THe problem was that Tomas removed the HAVING clause entirely and switched to a JOIN-based system. I didn't look over the code in-depth. All he *had* to do was change the HAVING clause to contain the aggregate function instead of the alias. If you would like to back out that patch and fix it in a much simpler way, I wouldn't object.
The code prior to bug 285555 was pretty awful. I think that a DISTINCT is preferable to usign aggregate functions in the HAVING clause. Bug 285555 does have the correct solution, it just missed the DISTINCT.
Flags: blocking2.20?
Flags: blocking2.20+
Flags: approval?
Flags: approval+
Checking in Bugzilla/FlagType.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/FlagType.pm,v <-- FlagType.pm new revision: 1.17; previous revision: 1.16 done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Summary: Flags get duplicated if multipe inclusions apply → Flags get duplicated if multiple inclusions apply
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: