Closed Bug 95430 Opened 23 years ago Closed 22 years ago

Reopening en masse fails.

Categories

(Bugzilla :: Creating/Changing Bugs, defect, P1)

2.13
x86
Linux

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: CodeMachine, Assigned: justdave)

References

()

Details

(Whiteboard: [fixed in 2.16.5] [fixed in 2.17.1])

Attachments

(2 files, 2 obsolete files)

There is an option for reopening on the bulk change page. However it doesn't work. It references the "id" parameter several times which does not exist for bulk changes. It looks like this problem _may_ have been introduced during the duplicates table introduction, as there's some code there that references the duplicates table. Or that just may have added more broken code. This should be looping through @idlist or some such. There's also similar code for mass duplicate marking. Although this probably can't get called from the UI, it probably still can be called by entering a special URL. It should be dealt with too.
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.16
OK, this is Gervy's fault. Gerv please take a look at the eventual patch here to not make the same misteak again. Anyway, to whomever does this, Dave said apparently there's an $id variable available so we will want to use that. Then the SELECT and DELETE should probably be next to each other (and indented properly). There's also code down lower that was pre-Gerv which handles trying to mass resolve dupe. This isn't allowed, so it does a (!defined($::FORM{'id'}) || ...), which is OK but it gives the error "can't mark bug dupe of itself". Instead it should say something like "can't bulk change resolve dupe" or whatever. Or alternatively use $id and support it, at least on the back end.
Where are we looking, here? Am I expected to do something about this? :-) Gerv
We're on top of it but you can do a patch if you want. See URL.
Component: Bugzilla → Creating/Changing Bugs
Product: Webtools → Bugzilla
Version: Bugzilla 2.13 → 2.10
correcting version field lost in product move
Version: 2.10 → 2.13
Whiteboard: mass_change
*** Bug 109147 has been marked as a duplicate of this bug. ***
Matty, who's "we"?
I think it was you and me - see comment #1. But it didn't seem to be as simple as you implied at the time, so I never got anything done on this.
OK, since we're not sure what we were doing on this and we don't have a patch yet, pushing this to 2.18
Severity: normal → major
Target Milestone: Bugzilla 2.16 → Bugzilla 2.18
*** Bug 129561 has been marked as a duplicate of this bug. ***
*** Bug 134595 has been marked as a duplicate of this bug. ***
Attached patch quick and dirty hack (obsolete) — Splinter Review
This is a quick hack along the lines of the suggestion in the original description. I'm not completely familiar with the source, so it might be totally wrong, but seems to work ok here. Caveat Emptor.
*** Bug 173536 has been marked as a duplicate of this bug. ***
*** Bug 177627 has been marked as a duplicate of this bug. ***
Attached patch Patch v.1 (obsolete) — Splinter Review
I worked on this because I thought it might have been my fault.. :) Anyway, here's what I worked on for the dup bug 177627.
Comment on attachment 104728 [details] [diff] [review] Patch v.1 r=joel
Attachment #104728 - Flags: review+
Comment on attachment 104728 [details] [diff] [review] Patch v.1 I think this is hiding the problem instead of fixing it. Your resulting query is going to have bug_id = '' in the case of a mass query, which will pass as valid SQL, but isn't getting us the results we want. We need to get the actual bug number in that SQL there.
Attachment #104728 - Flags: review-
Also I think mass reopen needs to clear the duplicates table if appropriate.
It's trying to do that in the code we're looking at, except it's not, because the bug_id isn't valid at that point if it's a mass-change. What we're discussing on IRC right now is checking later when we have individual bug IDs if the status is being changed to REOPENED to clear the duplicates table regardless. If the bug is being reopened it can't be a duplicate anymore, whether it was a duplicate to begin with or not, and if it wasn't before, your DELETE FROM duplicates will just return 0 rows changed.
Attached patch Patch v.2Splinter Review
Ok, moved duplicate deleting to the bug id loop.
Attachment #91871 - Attachment is obsolete: true
Attachment #104728 - Attachment is obsolete: true
Comment on attachment 104731 [details] [diff] [review] Patch v.2 tested on landfill, it works as advertised, and doesn't pollute the dupes table. r=justdave
Attachment #104731 - Flags: review+
Comment on attachment 104731 [details] [diff] [review] Patch v.2 2xr=joel
Attachment #104731 - Flags: review+
Checking in for Jeff: Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.162; previous revision: 1.161 done
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 225050 has been marked as a duplicate of this bug. ***
nominating for 2.16.5 because this is a low-risk fix for a functionality issue.
Whiteboard: mass_change → [wanted for 2.16.5] [fixed in 2.17.1]
Attachment #135043 - Flags: review?(myk)
Patch works, thank you very much.
Comment on attachment 135043 [details] [diff] [review] Patch against 2.16 branch Works, r=myk
Attachment #135043 - Flags: review?(myk) → review+
checked in on 2.16 branch: Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.125.2.9; previous revision: 1.125.2.8 done
Flags: approval+
Whiteboard: [wanted for 2.16.5] [fixed in 2.17.1] → [fixed in 2.16.5] [fixed in 2.17.1]
Target Milestone: Bugzilla 2.18 → Bugzilla 2.16
*** Bug 234202 has been marked as a duplicate of this bug. ***
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: