Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 313118 Details for
Bug 457321
When cloning a bug, all comments are not copied over, only the initial one
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to include all comments in a cloned bug and mark the private checkbox appropriately (v1)
cloned_bug_all_comments.patch (text/plain), 2.17 KB, created by
David Lawrence
on 2008-07-31 17:01:11 UTC
(
hide
)
Description:
Patch to include all comments in a cloned bug and mark the private checkbox appropriately (v1)
Filename:
MIME Type:
Creator:
David Lawrence
Created:
2008-07-31 17:01:11 UTC
Size:
2.17 KB
patch
obsolete
>Index: enter_bug.cgi >=================================================================== >RCS file: /cvs/qa/rh_bugzilla_3/enter_bug.cgi,v >retrieving revision 1.6 >diff -u -r1.6 enter_bug.cgi >--- enter_bug.cgi 30 Jul 2008 03:55:46 -0000 1.6 >+++ enter_bug.cgi 31 Jul 2008 16:58:43 -0000 >@@ -413,25 +413,34 @@ > $vars->{$field->name} = $cloned_bug->{$field->name}; > } > >-# We need to ensure that we respect the 'insider' status of >-# the first comment, if it has one. Either way, make a note >-# that this bug was cloned from another bug. >+ # We need to ensure that we respect the 'insider' status of each comment. >+ # Either way, make a note that this bug was cloned from another bug. > > $cloned_bug->longdescs(); >- my $isprivate = $cloned_bug->{'longdescs'}->[0]->{'isprivate'}; > >- $vars->{'comment'} = ""; >- $vars->{'commentprivacy'} = 0; >- >- if ( !($isprivate) || >- ( ( Bugzilla->params->{"insidergroup"} ) && >- ( Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}) ) ) >- ) { >- $vars->{'comment'} = $cloned_bug->{'longdescs'}->[0]->{'body'}; >- $vars->{'commentprivacy'} = $isprivate; >+ my $comment = ""; >+ my $count = 0; >+ my $isprivate = 0; >+ >+ foreach my $comment_ref (@{$cloned_bug->{'longdescs'}}) { >+ if (!$comment_ref->{'isprivate'} >+ || (Bugzilla->params->{'insidergroup'} >+ && Bugzilla->user->in_group(Bugzilla->params->{'insidergroup'}))) >+ { >+ if ($count > 0) { >+ $comment .= "\n\n--- Additional comment from " . $comment_ref->{'author'}->login . " on " . >+ format_time($comment_ref->{'time'}) . " ---\n\n"; >+ } >+ $comment .= $comment_ref->{'body'}; >+ $isprivate = 1 if $comment_ref->{'isprivate'}; # Whole comment is private if one old comment is private >+ $count++; >+ } > } > >-# Ensure that the groupset information is set up for later use. >+ $vars->{'comment'} = $comment; >+ $vars->{'commentprivacy'} = $isprivate; >+ >+ # Ensure that the groupset information is set up for later use. > $cloned_bug->groups(); > > } # end of cloned bug entry form
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
nelhawar
: review+
Actions:
View
|
Diff
Attachments on
bug 457321
: 313118