Bug 457321

Summary: When cloning a bug, all comments are not copied over, only the initial one
Product: [Community] Bugzilla Reporter: David Lawrence <dkl>
Component: Creating/Changing BugsAssignee: David Lawrence <dkl>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 3.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-03 01:11:36 UTC Type: ---
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: 406071    
Attachments:
Description Flags
Patch to include all comments in a cloned bug and mark the private checkbox appropriately (v1) nelhawar: review+

Description David Lawrence 2008-07-30 21:38:13 UTC
Currently in 2.18 when you clone a bug all of the comments are added to the
initial description as a single block of text (with private comments omitted).
With 3.2 when you clone a bug only the original bugs initial comment is cloned.
The others are missing. We need to implement this similar to 2.18 and place all
comments in the description.

Comment 1 David Lawrence 2008-07-31 16:59:47 UTC
Blocking bz3 updrade.

Comment 2 David Lawrence 2008-07-31 17:01:11 UTC
Created attachment 313118 [details]
Patch to include all comments in a cloned bug and mark the private checkbox appropriately (v1)

Patch to include all comments in a cloned bug and mark the private checkbox
appropriately. If one or more original comments are private and the user can
see them, the initial description is private checkbox is checked.

Please review.
Dave

Comment 3 Noura El hawary 2008-08-01 03:43:41 UTC
Comment on attachment 313118 [details]
Patch to include all comments in a cloned bug and mark the private checkbox appropriately (v1)

Hi Dave the patch looks good and works perfect for the comments, but i noticed
something else when cloning bugs that is related to the issue tracker field:

basically when the original bug doesn't have any ITs then when you clone
sometimes the issuetracker field in the enter_bug.cgi form page will have '---'
or it will be empty,, the other  case if the original bug has some ITs then
when you clone it the issue tracker field in enter_bug.cgi will have the value
'NO'. that produces and error for validating IT ids ,, from 2.18 code usually
IT field doesn't get cloned caze of the IT<->bugzilla  1 to many relationship
so basically I think a little workaround of setting the $vars->{cf_issutracker}
= ''; in the case of cloned_bug_id is defined can solve the issue for me , but
maybe you have a better solution.

Noura

Comment 4 David Lawrence 2008-08-01 04:35:34 UTC
(In reply to comment #3)
> (From update of attachment 313118 [details] [edit])
> Hi Dave the patch looks good and works perfect for the comments, but i noticed
> something else when cloning bugs that is related to the issue tracker field:
> 
> basically when the original bug doesn't have any ITs then when you clone
> sometimes the issuetracker field in the enter_bug.cgi form page will have '---'
> or it will be empty,, the other  case if the original bug has some ITs then
> when you clone it the issue tracker field in enter_bug.cgi will have the value
> 'NO'. that produces and error for validating IT ids ,, from 2.18 code usually
> IT field doesn't get cloned caze of the IT<->bugzilla  1 to many relationship
> so basically I think a little workaround of setting the $vars->{cf_issutracker}
> = ''; in the case of cloned_bug_id is defined can solve the issue for me , but
> maybe you have a better solution.
> 
> Noura
> 

Thanks for the review Noura.

I agree that if we do not clone IT's in 2.18 we should then disallow it for 3.2
as well. It is strange that the problem is intermittent. Please file a bug for
it so we can revisit it later and I will add the hack to fix it for now with my
clone patch.

I will add $vars->{cf_issuetracker'} = ''; as you suggested.

Thanks

Comment 5 David Lawrence 2008-08-01 04:48:27 UTC
Checked in to CVS.