Bug 826305

Summary: Problem when making a comment while changing the status
Product: [Community] Bugzilla Reporter: Simon Green <sgreen>
Component: Creating/Changing BugsAssignee: Simon Green <sgreen>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: high    
Version: 4.2CC: anross, ebaak, sgreen, sthirugn, xhe
Target Milestone: 4.2-1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.2.1-1.7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-30 01:10:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 786624    

Description Simon Green 2012-05-30 00:32:40 UTC
Description of problem:
Error message occurs when changing the status from ON_QA to ASSIGNED while making a comment.

Version-Release number of selected component (if applicable):
4.2

How reproducible:
always

Steps to Reproduce:
1. Find a JBoss SOA 5 bug with the status of ON_QA
2. Change the status to assigned and make a comment.
3. Bugzilla go boom!
  
Actual results:
DBD::mysql::db do failed: Duplicate entry '4704854' for key 1 [for Statement "INSERT INTO longdescs (thetext, bug_id, work_time, comment_id, extra_data, who, bug_when, isprivate, already_wrapped, type) VALUES (?,?,?,?,?,?,?,?,?,?)"] at Bugzilla/Object.pm line 587
	Bugzilla::Object::insert_create_data('Bugzilla::Comment', 'Bugzilla::Comment=HASH(0x12733730)') called at Bugzilla/Bug.pm line 1097
	Bugzilla::Bug::update('Bugzilla::Bug=HASH(0x1224b800)') called at ./extensions/RedHat/Extension.pm line 1082
	Bugzilla::Extension::RedHat::bug_end_of_update('Bugzilla::Extension::RedHat=HASH(0x11ecfcd0)', 'HASH(0x12733a40)') called at Bugzilla/Hook.pm line 33
	Bugzilla::Hook::process('bug_end_of_update', 'HASH(0x12733a40)') called at Bugzilla/Bug.pm line 1198
	Bugzilla::Bug::update('Bugzilla::Bug=HASH(0x1224b800)') called at /var/www/html/bugzilla/process_bug.cgi line 505


Expected results:
Comment made and status changed.

Additional info:
This may happen with other status changes for other products. The case above is the one that I can reproduce.

Comment 2 Simon Green 2012-05-30 01:10:19 UTC
This will be fixed in the next release.

The error occurred when ALL the following are true.
1) The bug was in the state ON_QA, VERIFIED, or RELEASE_PENDING.
2) The bug was changed to the ASSIGNED state.
3) The bug did not have the FailedQA verified field set.
4) The user making the change has the ability to set the FailedQA verified field
5) A comment was made.

The temporary work around is to not do all those things at once :)

  -- simon

Comment 3 Simon Green 2012-05-30 05:25:07 UTC
*** Bug 826371 has been marked as a duplicate of this bug. ***

Comment 4 Jeff Fearn 🐞 2018-09-13 09:42:56 UTC
*** Bug 1182599 has been marked as a duplicate of this bug. ***