Bug 457321 - When cloning a bug, all comments are not copied over, only the initial one
Summary: When cloning a bug, all comments are not copied over, only the initial one
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Creating/Changing Bugs
Version: 3.2
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: RHBZ30UpgradeTracker
TreeView+ depends on / blocked
 
Reported: 2008-07-30 21:38 UTC by David Lawrence
Modified: 2013-06-24 04:06 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-08-03 01:11:36 UTC
Embargoed:


Attachments (Terms of Use)
Patch to include all comments in a cloned bug and mark the private checkbox appropriately (v1) (2.17 KB, patch)
2008-07-31 17:01 UTC, David Lawrence
nelhawar: review+
Details | Diff

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.


Note You need to log in before you can comment on or make changes to this bug.