]> git.donarmstrong.com Git - debbugs.git/blobdiff - scripts/service
fix logfh call
[debbugs.git] / scripts / service
index 8d9875d00e7f104e05a3d31d2b4b61142a9e985c..89ff785c4152234c72c62f02fb30ac9e17a755c1 100755 (executable)
@@ -787,7 +787,7 @@ END
        $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
@@ -852,7 +852,7 @@ END
        $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 {
@@ -1112,9 +1112,9 @@ END
                %limit_pkgs = map { ($_, 1) } @pkgs;
                $limit{package} = [@pkgs];
                print {$transcript} "Limiting to bugs with field 'package' containing at least one of ".join(', ',map {qq('$_')} @pkgs)."\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('$_')} @{$limit{$limit_field}})."\n";
+                   print {$transcript} " '$limit_field':".join(', ',map {qq('$_')} @{$limit{$limit_field}})."\n";
                }
                print {$transcript} "\n";
        } else {
@@ -1130,15 +1130,15 @@ END
            %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('$_')} @{$limit{$limit_field}})."\n";
+               print {$transcript} " '$limit_field':".join(', ',map {qq('$_')} @{$limit{$limit_field}})."\n";
            }
            print {$transcript} "\n";
        }
@@ -1301,13 +1301,12 @@ References: $header{'message-id'}
 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,
@@ -1354,12 +1353,15 @@ sub fill_template{
      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,