Bug 621362

Summary: "Duplicate entry" software error when submitting a bug via post_bug.cgi
Product: [Community] Bugzilla Reporter: Clayton Arndt <carndt>
Component: Creating/Changing BugsAssignee: PnT DevOps Devs <hss-ied-bugs>
Severity: high Docs Contact:
Priority: low    
Version: 3.6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-05 18:27:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Clayton Arndt 2010-08-04 20:30:57 UTC
Background: my team maintains a mirroring tool which creates new bugs in Red Hat Bugzilla by sending HTTP POST requests to invoke the post_bug.cgi script.

During testing with Red Hat Bugzilla 3.6, I noticed that a POST request which succeeds under Bugzilla 3.4 now throws back a software error under Bugzilla 3.6.

(Note that the Red Hat bug indicated in the software error still gets created; however, the error causes our mirroring process to fail.)

*** Example: ***


*** Error returned: ***

Software error:

DBD::mysql::db do failed: Duplicate entry '614820-7-58042' for key 2 [for Statement "INSERT INTO ext_bz_bug_map (ext_bz_id, ext_bz_bug_id, bug_id) VALUES (?,?,?)"] at Bugzilla/Object.pm line 483
	Bugzilla::Object::insert_create_data('Bugzilla::Extension::ExternalBugs::Bug', 'HASH(0x116eb9a0)') called at /loader/0x10afd9c0/Bugzilla/Extension/ExternalBugs/Bug.pm line 77
	Bugzilla::Extension::ExternalBugs::Bug::create('Bugzilla::Extension::ExternalBugs::Bug', 'HASH(0x116ec090)') called at ./extensions/ExternalBugs/Extension.pm line 286
	Bugzilla::Extension::ExternalBugs::bug_end_of_update('Bugzilla::Extension::ExternalBugs=HASH(0x1092d970)', 'HASH(0x117264e0)') called at Bugzilla/Hook.pm line 33
	Bugzilla::Hook::process('bug_end_of_update', 'HASH(0x117264e0)') called at Bugzilla/Bug.pm line 1142
	Bugzilla::Bug::update('Bugzilla::Bug=HASH(0x116bee70)', '2010-08-04 16:26:21') called at /var/www/html/bugzilla/post_bug.cgi line 259

For help, please send mail to the webmaster (bugzilla-owner@redhat.com), giving this error message and the time and date of the error.

Comment 1 David Lawrence 2010-08-05 18:27:53 UTC
Thanks for the report. A fix has been committed and will be in the next code update of partner-bugzilla.redhat.com probably the next day.


Comment 2 Clayton Arndt 2010-08-12 19:07:18 UTC
Confirmed the successful create of a new bug via the HTTP POST request. Thanks for the fix!