Bug 40933
Merge Block cloned bug, Clone bug from comment (Bug 14515) into Bugzilla 3.2 git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@78 6955db30-a419-402b-8a0d-67ecbb4d7f56custis
parent
45dd03f070
commit
b67247e53b
|
@ -389,23 +389,23 @@ foreach my $field (@enter_bug_fields) {
|
|||
|
||||
if ($cloned_bug_id) {
|
||||
|
||||
$default{'component_'} = $cloned_bug->component;
|
||||
$default{'priority'} = $cloned_bug->priority;
|
||||
$default{'bug_severity'} = $cloned_bug->bug_severity;
|
||||
$default{'rep_platform'} = $cloned_bug->rep_platform;
|
||||
$default{'op_sys'} = $cloned_bug->op_sys;
|
||||
$default{component_} = $cloned_bug->component;
|
||||
$default{priority} = $cloned_bug->priority;
|
||||
$default{bug_severity} = $cloned_bug->bug_severity;
|
||||
$default{rep_platform} = $cloned_bug->rep_platform;
|
||||
$default{op_sys} = $cloned_bug->op_sys;
|
||||
|
||||
$vars->{'short_desc'} = $cloned_bug->short_desc;
|
||||
$vars->{'bug_file_loc'} = $cloned_bug->bug_file_loc;
|
||||
$vars->{'keywords'} = $cloned_bug->keywords;
|
||||
$vars->{'dependson'} = $cloned_bug_id;
|
||||
$vars->{'blocked'} = "";
|
||||
$vars->{'deadline'} = $cloned_bug->deadline;
|
||||
$vars->{short_desc} = $cloned_bug->short_desc;
|
||||
$vars->{bug_file_loc} = $cloned_bug->bug_file_loc;
|
||||
$vars->{keywords} = $cloned_bug->keywords;
|
||||
$vars->{dependson} = "";
|
||||
$vars->{blocked} = $cloned_bug_id;
|
||||
$vars->{deadline} = $cloned_bug->deadline;
|
||||
|
||||
if (defined $cloned_bug->cc) {
|
||||
$vars->{'cc'} = join (" ", @{$cloned_bug->cc});
|
||||
$vars->{cc} = join (" ", @{$cloned_bug->cc});
|
||||
} else {
|
||||
$vars->{'cc'} = formvalue('cc');
|
||||
$vars->{cc} = formvalue('cc');
|
||||
}
|
||||
|
||||
foreach my $field (@enter_bug_fields) {
|
||||
|
@ -417,37 +417,41 @@ if ($cloned_bug_id) {
|
|||
# the first comment, if it has one. Either way, make a note
|
||||
# that this bug was cloned from another bug.
|
||||
|
||||
my $isprivate = $cloned_bug->longdescs->[0]->{'isprivate'};
|
||||
my $cloned_comment = formvalue('cloned_comment', 0);
|
||||
my $isprivate = $cloned_bug->longdescs->[$cloned_comment]->{isprivate};
|
||||
|
||||
$vars->{'comment'} = "";
|
||||
$vars->{'commentprivacy'} = 0;
|
||||
$vars->{comment} = "";
|
||||
$vars->{commentprivacy} = 0;
|
||||
|
||||
if ( !($isprivate) || Bugzilla->user->is_insider ) {
|
||||
$vars->{'comment'} = $cloned_bug->longdescs->[0]->{'body'};
|
||||
$vars->{'commentprivacy'} = $isprivate;
|
||||
if (!$isprivate || Bugzilla->user->is_insider)
|
||||
{
|
||||
$vars->{cloned_comment} = $cloned_comment;
|
||||
$vars->{comment} = $cloned_bug->longdescs->[$cloned_comment]->{body};
|
||||
$vars->{comment} =~ s!bug\s*#?\s*(\d+)\s*,?\s*comment\s*#?\s*(\d+)!Bug $cloned_bug_id, comment $2!gso;
|
||||
$vars->{commentprivacy} = $isprivate;
|
||||
}
|
||||
|
||||
} # end of cloned bug entry form
|
||||
|
||||
else {
|
||||
|
||||
$default{'component_'} = formvalue('component');
|
||||
$default{'priority'} = formvalue('priority', Bugzilla->params->{'defaultpriority'});
|
||||
$default{'bug_severity'} = formvalue('bug_severity', Bugzilla->params->{'defaultseverity'});
|
||||
$default{'rep_platform'} = pickplatform();
|
||||
$default{'op_sys'} = pickos();
|
||||
$default{component_} = formvalue('component');
|
||||
$default{priority} = formvalue('priority', Bugzilla->params->{defaultpriority});
|
||||
$default{bug_severity} = formvalue('bug_severity', Bugzilla->params->{defaultseverity});
|
||||
$default{rep_platform} = pickplatform();
|
||||
$default{op_sys} = pickos();
|
||||
|
||||
$vars->{'short_desc'} = formvalue('short_desc');
|
||||
$vars->{'bug_file_loc'} = formvalue('bug_file_loc', "http://");
|
||||
$vars->{'keywords'} = formvalue('keywords');
|
||||
$vars->{'dependson'} = formvalue('dependson');
|
||||
$vars->{'blocked'} = formvalue('blocked');
|
||||
$vars->{'deadline'} = formvalue('deadline');
|
||||
$vars->{short_desc} = formvalue('short_desc');
|
||||
$vars->{bug_file_loc} = formvalue('bug_file_loc', "http://");
|
||||
$vars->{keywords} = formvalue('keywords');
|
||||
$vars->{dependson} = formvalue('dependson');
|
||||
$vars->{blocked} = formvalue('blocked');
|
||||
$vars->{deadline} = formvalue('deadline');
|
||||
|
||||
$vars->{'cc'} = join(', ', $cgi->param('cc'));
|
||||
$vars->{cc} = join(', ', $cgi->param('cc'));
|
||||
|
||||
$vars->{'comment'} = formvalue('comment');
|
||||
$vars->{'commentprivacy'} = formvalue('commentprivacy');
|
||||
$vars->{comment} = formvalue('comment');
|
||||
$vars->{commentprivacy} = formvalue('commentprivacy');
|
||||
|
||||
} # end of normal/bookmarked entry form
|
||||
|
||||
|
|
|
@ -454,7 +454,7 @@ function handleWantsAttachment(wants_attachment) {
|
|||
<td colspan="3">
|
||||
[% defaultcontent = BLOCK %]
|
||||
[% IF cloned_bug_id %]
|
||||
+++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id %] +++
|
||||
+++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id %][% IF cloned_comment %] comment [% cloned_comment %][% END %] +++
|
||||
|
||||
|
||||
[% END %]
|
||||
|
|
|
@ -32,16 +32,21 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
|
||||
/* Outputs a link to call replyToComment(); used to reduce HTML output */
|
||||
function addReplyLink(id, real_id) {
|
||||
/* XXX this should really be updated to use the DOM Core's
|
||||
* createElement, but finding a container isn't trivial.
|
||||
*/
|
||||
var s = '[';
|
||||
[% IF user.settings.quote_replies.value != 'off' %]
|
||||
document.write('[<a href="#add_comment" onclick="replyToComment(' +
|
||||
id + ',' + real_id + ');">reply<' + '/a>]');
|
||||
s += '<a href="#add_comment" onclick="replyToComment(' +
|
||||
id + ',' + real_id + ');">reply<' + '/a>';
|
||||
[% END %]
|
||||
s += ', clone to <a href="enter_bug.cgi?cloned_bug_id=[% bug.bug_id %]&cloned_comment='+id+'">other</a>';
|
||||
s += '/<a href="enter_bug.cgi?cloned_bug_id=[% bug.bug_id %]&product=[% bug.product %]&cloned_comment='+id+'">same</a> product';
|
||||
s += ']';
|
||||
document.write(s);
|
||||
}
|
||||
|
||||
/* Adds the reply text to the `comment' textarea */
|
||||
|
|
Loading…
Reference in New Issue