Closed Bug 277417 Opened 20 years ago Closed 20 years ago

SQL error when reloading the page after changing the bug resolution to duplicate

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

2.18
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: janez.trost, Assigned: LpSolit)

References

Details

Attachments

(1 file, 2 obsolete files)

Reproduce 1. Resolve bug as duplicate 2. Commit 3. On next page hit reload (on browser) - dont ask me why i did this; 4. On 'Mid-air collision' page save your changes anyway You get this message: Software error: DBD::mysql::st execute failed: Duplicate entry '18' for key 1 [for Statement "INSERT INTO duplicates VALUES (17, 18)"] at Bugzilla/DB.pm line 62 Bugzilla::DB::SendSQL('INSERT INTO duplicates VALUES (17, 18)') called at C:/Bugzilla/process_bug.cgi line 1760
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
*** Bug 297266 has been marked as a duplicate of this bug. ***
Attached patch patch, v1 (obsolete) — Splinter Review
Assignee: myk → LpSolit
Status: NEW → ASSIGNED
Attachment #185865 - Flags: review?(wicked)
For the record, as un-nice as this is, it's not a regression, and it's also an edge case, so it's not worth pushing for a stable branch. This issue is a side effect of the more general problem of allowing the same form to be submitted twice, although a specific test for "this bug is already a duplicate of <foo>" might be a nice thing to have anyway.
Target Milestone: --- → Bugzilla 2.20
Attached patch patch, v1.1 (obsolete) — Splinter Review
add a whitespace between 'bug' and its number.
Attachment #185865 - Attachment is obsolete: true
Attachment #185866 - Flags: review?(wicked)
Attachment #185865 - Flags: review?(wicked)
Comment on attachment 185866 [details] [diff] [review] patch, v1.1 Tested and this seems to fix the error and report an user error instead. Normal duplication and status changes seem to work. I was thinking that maybe a mid-air collision would be better than an user error. But maybe it's ok as I see there is already an user error reported when duplicating to same bug number.. Only minor problem is with the title of the error message. "Duplication Entry Found" just doesn't sound right. Perhaps use "Already marked as duplicate" or something else. Also change word dupe in the error text to duplicate.
Attachment #185866 - Flags: review?(wicked) → review-
Attached patch patch, v2Splinter Review
happy now?
Attachment #185866 - Attachment is obsolete: true
Attachment #185874 - Flags: review?(wicked)
Comment on attachment 185874 [details] [diff] [review] patch, v2 No, but that's not because of your patch. It's good to go. r=wicked
Attachment #185874 - Flags: review?(wicked) → review+
Flags: approval?
Flags: approval? → approval+
Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.258; previous revision: 1.257 done Checking in template/en/default/global/user-error.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/global/user-error.html.tmpl,v <-- user-error.html.tmpl new revision: 1.111; previous revision: 1.110 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Summary: Software error if you reload page after changing status to duplicate → SQL error when reloading the page after changing the bug resolution to duplicate
*** Bug 151129 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

Created:
Updated:
Size: