my @common_control_options =
- (($dl > 0 ? (debug => $transcript):()),
- transcript => $transcript,
+ (transcript => $transcript,
requester => $header{from},
request_addr => $controlrequestaddr,
request_msgid => $header{'message-id'},
last;
} elsif (m/^debug\s+(\d+)$/i && $1 >= 0 && $1 <= 1000) {
$dl= $1+0;
- print {$transcript} "Debug level $dl.\n\n";
+ if ($dl > 0 and not grep /debug/,@common_control_options) {
+ push @common_control_options,(debug => $transcript);
+ }
+ print {$transcript} "Debug level $dl.\n\n";
} elsif (m/^(send|get)\s+\#?(\d{2,})$/i) {
$ref= $2+0;
&sendlynxdoc("bugreport.cgi?bug=$ref","logs for $gBug#$ref");
# to set_found
if (defined($version) && length $version) {
set_found(@common_control_options,
- bug => $ref,
- version => $version,
+ bug => $ref,
+ found => $version,
);
}
};
} elsif (m/^reopen\s+\#?(-?\d+)(?:\s+([\=\!]|(?:\S.*\S)))?$/i) {
$ok++;
$ref= $1;
- $bug_affected{$ref}=1;
+ $ref = $clonebugs{$ref} if exists $clonebugs{$ref};
+ $bug_affected{$ref}=1;
my $new_submitter = $2;
if (defined $new_submitter) {
if ($new_submitter eq '=') {
$ref = $clonebugs{$ref} if exists $clonebugs{$ref};
$bug_affected{$ref}=1;
my $tags = $2;
- my @tags = split /[\s,]+/, $tags;
+ my @tags = map {m/^([+=-])(.+)/ ? ($1,$2):($_)} split /[\s,]+/, $tags;
# this is an array of hashrefs which contain two elements, the
# first of which is the array of tags, the second is the
# option to pass to set_tag (we use a hashref here to make it
# more obvious what is happening)
my @tag_operations;
- my $alter_type = '=';
my @badtags;
for my $tag (@tags) {
if ($tag =~ /^[=+-]$/) {
elsif ($tag eq '+') {
push @tag_operations,
{tags => [],
- option => [add => 1]
+ option => [add => 1],
};
}
next;
}
if (not @tag_operations) {
@tag_operations = {tags => [],
- option => []
+ option => [add => 1],
};
}
push @{$tag_operations[-1]{tags}},$tag;
$ok++;
$ref= $2;
my $add_remove = defined $1 && $1 eq 'un';
- my @blockers = split /[\s,]+/, $3;
+ my @blockers = map {exists $clonebugs{$_}?$clonebugs{$_}:$_} split /[\s,]+/, $3;
$ref = $clonebugs{$ref} if exists $clonebugs{$ref};
$bug_affected{$ref} = 1;
eval {
if (scalar(@pkgs) > 0) {
%limit_pkgs = map { ($_, 1) } @pkgs;
$limit{package} = [@pkgs];
- print {$transcript} "Ignoring bugs not assigned to: " .
- join(" ", keys(%limit_pkgs)) . "\n\n";
+ print {$transcript} "Limiting to bugs with field 'package' containing at least one of ".join(', ',map {qq('$_')} @pkgs)."\n";
+ print {$transcript} "Limit currently set to";
+ for my $limit_field (keys %limit) {
+ print {$transcript} " '$limit_field':".join(', ',map {qq('$_')} @{$limit{$limit_field}})."\n";
+ }
+ print {$transcript} "\n";
} else {
- %limit_pkgs = ();
- print {$transcript} "Not ignoring any bugs.\n\n";
+ %limit_pkgs = ();
+ $limit{package} = [];
+ print {$transcript} "Limit cleared.\n\n";
}
} elsif (m/^limit\:?\s+(\S.*\S)\s*$/) {
$ok++;
%limit = ();
print {$transcript} "Limit cleared.\n\n";
}
- elsif (exists $Debbugs::Status::fields{$field} ) {
+ elsif (exists $Debbugs::Status::fields{$field} or $field eq 'source') {
# %limit can actually contain regexes, but because they're
# not evaluated in Safe, DO NOT allow them through without
# fixing this.
$limit{$field} = [@options];
print {$transcript} "Limiting to bugs with field '$field' containing at least one of ".join(', ',map {qq('$_')} @options)."\n";
- print {$transcript} "Limit currently set to ";
+ print {$transcript} "Limit currently set to";
for my $limit_field (keys %limit) {
- print {$transcript} " '$limit_field':".join(', ',map {qq('$_')} @options)."\n";
+ print {$transcript} " '$limit_field':".join(', ',map {qq('$_')} @{$limit{$limit_field}})."\n";
}
print {$transcript} "\n";
}
Message-ID: <handler.s.$nn.transcript\@$gEmailDomain>
Precedence: bulk
${packagepr}X-$gProject-PR-Message: transcript
-
-${transcript_scalar}Please contact me if you need assistance.
-
-$gMaintainer
-(administrator, $gProject $gBugs database)
END
+$reply .= fill_template('mail/message_body',
+ {body => "${transcript_scalar}Please contact me if you need assistance."},
+ );
+
my $repliedshow= join(', ',$replyto,
determine_recipients(recipients => \%recipients,
cc => 1,
my $variables = {config => \%config,
defined($ref)?(ref => $ref):(),
defined($data)?(data => $data):(),
+ refs => [keys %bug_affected],
%{$extra_var},
};
my $hole_var = {'&bugurl' =>
sub{"$_[0]: ".
'http://'.$config{cgi_domain}.'/'.
- Debbugs::CGI::bug_url($_[0]);
+ Debbugs::CGI::bug_links(bug=>$_[0],
+ links_only => 1,
+ );
}
};
return fill_in_template(template => $template,