]> git.donarmstrong.com Git - debbugs.git/commitdiff
merge changes from don
authorDebian BTS <debbugs@rietz>
Sun, 10 Aug 2008 00:28:28 +0000 (00:28 +0000)
committerDebian BTS <debbugs@rietz>
Sun, 10 Aug 2008 00:28:28 +0000 (00:28 +0000)
Debbugs/Bugs.pm
Debbugs/Common.pm
Debbugs/Control.pm
Debbugs/Status.pm
debian/changelog
html/bugs.css
scripts/service
t/06_mail_handling.t
templates/en_US/cgi/bugreport_buginfo.tmpl
templates/en_US/cgi/short_bug_status.tmpl

index 9bfd4ae3c620d0ccc9678212f5ddd18bf783d5e3..36bcc7b487e6c6c1c3d84de20c66aff68445b104 100644 (file)
@@ -92,6 +92,8 @@ for limited regular expressions, and/or more complex expressions.
 
 =item correspondent -- address of someone who sent mail to the log
 
+=item affects -- bugs which affect this package
+
 =item dist -- distribution (I don't know about this one yet)
 
 =item bugs -- list of bugs to search within
@@ -182,6 +184,9 @@ sub get_bugs{
                                          correspondent => {type => SCALAR|ARRAYREF,
                                                            optional => 1,
                                                           },
+                                         affects   => {type => SCALAR|ARRAYREF,
+                                                       optional => 1,
+                                                      },
                                          function  => {type => CODEREF,
                                                        optional => 1,
                                                       },
@@ -415,6 +420,9 @@ sub get_bugs_by_idx{
                                          correspondent => {type => SCALAR|ARRAYREF,
                                                            optional => 1,
                                                           },
+                                         affects => {type => SCALAR|ARRAYREF,
+                                                     optional => 1,
+                                                    },
                                          usertags  => {type => HASHREF,
                                                        optional => 1,
                                                       },
@@ -517,6 +525,9 @@ sub get_bugs_flatfile{
                                          correspondent => {type => SCALAR|ARRAYREF,
                                                            optional => 1,
                                                           },
+                                         affects   => {type => SCALAR|ARRAYREF,
+                                                       optional => 1,
+                                                      },
 # not yet supported
 #                                        dist      => {type => SCALAR|ARRAYREF,
 #                                                      optional => 1,
@@ -566,9 +577,10 @@ sub get_bugs_flatfile{
          $bugs{$_} = 1 for make_list($param{bugs});
          $grep_bugs = 1;
      }
-     if (exists $param{owner} or exists $param{correspondent}) {
+     if (exists $param{owner} or exists $param{correspondent} or exists $param{affects}) {
          $bugs{$_} = 1 for get_bugs_by_idx(exists $param{correspondent}?(correspondent => $param{correspondent}):(),
                                            exists $param{owner}?(owner => $param{owner}):(),
+                                           exists $param{affects}?(affects => $param{affects}):(),
                                           );
          $grep_bugs = 1;
      }
index f4a3f0cea33e70d78603d12c3bc2a62bbecc601e..a4d7cf109136c99f370b40fd9b3b1515e38c02c4 100644 (file)
@@ -43,7 +43,7 @@ BEGIN{
                                qw(getmaintainers_reverse),
                                qw(getpseudodesc),
                               ],
-                    misc   => [qw(make_list globify_scalar)],
+                    misc   => [qw(make_list globify_scalar english_join)],
                     date   => [qw(secs_to_english)],
                     quit   => [qw(quit)],
                     lock   => [qw(filelock unfilelock lockpid)],
@@ -478,6 +478,27 @@ sub make_list {
 }
 
 
+=head2 english_join
+
+     print english_join(', ',' and ',@list);
+
+Joins list properly to make an english phrase.
+
+
+
+=cut
+
+sub english_join {
+     my ($normal,$last,@list) = @_;
+     if (@list <= 1) {
+         return @list?$list[0]:'';
+     }
+     my $ret = $last . pop(@list);
+     $ret = join($normal,@list) . $ret;
+     return $ret;
+}
+
+
 =head2 globify_scalar
 
      my $handle = globify_scalar(\$foo);
index 30a642b0bff22214fed508fa0423095e2a0f5dcf..b9607b606b86baa259ef87a02cfc1b1fcafeffa9 100644 (file)
@@ -78,7 +78,9 @@ BEGIN{
      $DEBUG = 0 unless defined $DEBUG;
 
      @EXPORT = ();
-     %EXPORT_TAGS = (owner   => [qw(owner)],
+     %EXPORT_TAGS = (affects => [qw(affects)],
+                    summary => [qw(summary)],
+                    owner   => [qw(owner)],
                     archive => [qw(bug_archive bug_unarchive),
                                ],
                     log     => [qw(append_action_to_log),
@@ -91,7 +93,7 @@ BEGIN{
 
 use Debbugs::Config qw(:config);
 use Debbugs::Common qw(:lock buglog :misc get_hashname);
-use Debbugs::Status qw(bug_archiveable :read :hook writebug);
+use Debbugs::Status qw(bug_archiveable :read :hook writebug splitpackages);
 use Debbugs::CGI qw(html_escape);
 use Debbugs::Log qw(:misc);
 use Debbugs::Recipients qw(:add);
@@ -157,6 +159,30 @@ my %append_action_options =
 
 
 # this is just a generic stub for Debbugs::Control functions.
+#
+# =head2 foo
+#
+#      eval {
+#          foo(bug          => $ref,
+#              transcript   => $transcript,
+#              ($dl > 0 ? (debug => $transcript):()),
+#              requester    => $header{from},
+#              request_addr => $controlrequestaddr,
+#              message      => \@log,
+#               affected_packages => \%affected_packages,
+#              recipients   => \%recipients,
+#              summary      => undef,
+#              );
+#      };
+#      if ($@) {
+#          $errors++;
+#          print {$transcript} "Failed to foo $ref bar: $@";
+#      }
+#
+# Foo frobinates
+#
+# =cut
+#
 # sub foo {
 #     my %param = validate_with(params => \@_,
 #                            spec   => {bug => {type   => SCALAR,
@@ -179,11 +205,323 @@ my %append_action_options =
 #     my (@data);
 #     ($locks, @data) = lock_read_all_merged_bugs($param{bug});
 #     __handle_affected_packages(data => \@data,%param);
+#     print {$transcript} __bug_info(@data);
 #     add_recipients(data => \@data,
 #                   recipients => $param{recipients}
 #                  );
+#     for my $data (@data) {
+#       append_action_to_log(bug => $data->{bug_num},
+#                            get_lock => 0,
+#                            __return_append_to_log_options(
+#                                                           %param,
+#                                                           action => $action,
+#                                                          ),
+#                           )
+#             if not exists $param{append_log} or $param{append_log};
+#        writebug($data->{bug_num},$data);
+#        print {$transcript} "$action\n";
+#        add_recipients(data => $data,
+#                       recipients => $param{recipients},
+#                      );
+#      }
+#      if ($locks) {
+#        for (1..$locks) { unfilelock(); }
+#      }
+#
 # }
 
+=head2 affects
+
+     eval {
+           affects(bug          => $ref,
+                   transcript   => $transcript,
+                   ($dl > 0 ? (debug => $transcript):()),
+                   requester    => $header{from},
+                   request_addr => $controlrequestaddr,
+                   message      => \@log,
+                    affected_packages => \%affected_packages,
+                   recipients   => \%recipients,
+                   packages     => undef,
+                    add          => 1,
+                    remove       => 0,
+                   );
+       };
+       if ($@) {
+           $errors++;
+           print {$transcript} "Failed to mark $ref as affecting $packages: $@";
+       }
+
+This marks a bug as affecting packages which the bug is not actually
+in. This should only be used in cases where fixing the bug instantly
+resolves the problem in the other packages.
+
+By default, the packages are set to the list of packages passed.
+However, if you pass add => 1 or remove => 1, the list of packages
+passed are added or removed from the affects list, respectively.
+
+=cut
+
+sub affects {
+    my %param = validate_with(params => \@_,
+                             spec   => {bug => {type   => SCALAR,
+                                                regex  => qr/^\d+$/,
+                                               },
+                                        # specific options here
+                                        packages => {type => SCALAR|ARRAYREF,
+                                                     default => [],
+                                                    },
+                                        add      => {type => BOOLEAN,
+                                                     default => 0,
+                                                    },
+                                        remove   => {type => BOOLEAN,
+                                                     default => 0,
+                                                    },
+                                        %common_options,
+                                        %append_action_options,
+                                       },
+                            );
+    if ($param{add} and $param{remove}) {
+        croak "Asking to both add and remove affects is nonsensical";
+    }
+    our $locks = 0;
+    $locks = 0;
+    local $SIG{__DIE__} = sub {
+       if ($locks) {
+           for (1..$locks) { unfilelock(); }
+           $locks = 0;
+       }
+    };
+    my ($debug,$transcript) = __handle_debug_transcript(%param);
+    my (@data);
+    ($locks, @data) = lock_read_all_merged_bugs($param{bug});
+    __handle_affected_packages(data => \@data,%param);
+    print {$transcript} __bug_info(@data);
+    add_recipients(data => \@data,
+                  recipients => $param{recipients}
+                 );
+    my $action = 'Did not alter affected packages';
+    for my $data (@data) {
+        print {$debug} "Going to change affects\n";
+        my @packages = splitpackages($data->{affects});
+        my %packages;
+        @packages{@packages} = (1) x @packages;
+        if ($param{add}) {
+             my @added = ();
+             for my $package (make_list($param{packages})) {
+                  if (not $packages{$package}) {
+                       $packages{$package} = 1;
+                       push @added,$package;
+                  }
+             }
+             if (@added) {
+                  $action = "Added indication that $data->{bug_num} affects ".
+                       english_join(', ',' and ',@added);
+             }
+        }
+        elsif ($param{remove}) {
+             my @removed = ();
+             for my $package (make_list($param{packages})) {
+                  if ($packages{$package}) {
+                       delete $packages{$package};
+                       push @removed,$package;
+                  }
+             }
+             $action = "Removed indication that $data->{bug_num} affects " .
+                  english_join(', ',' and ',@removed);
+        }
+        else {
+             %packages = ();
+             for my $package (make_list($param{packages})) {
+                  $packages{$package} = 1;
+             }
+             $action = "Noted that $data->{bug_num} affects ".
+                  english_join(', ',' and ', keys %packages);
+        }
+        $data->{affects} = join(',',keys %packages);
+        append_action_to_log(bug => $data->{bug_num},
+                             get_lock => 0,
+                             __return_append_to_log_options(
+                                                            %param,
+                                                            action => $action,
+                                                           ),
+                            )
+              if not exists $param{append_log} or $param{append_log};
+         writebug($data->{bug_num},$data);
+         print {$transcript} "$action\n";
+         add_recipients(data => $data,
+                        recipients => $param{recipients},
+                       );
+     }
+     if ($locks) {
+         for (1..$locks) { unfilelock(); }
+     }
+
+}
+
+
+=head1 SUMMARY FUNCTIONS
+
+=head2 summary
+
+     eval {
+           summary(bug          => $ref,
+                   transcript   => $transcript,
+                   ($dl > 0 ? (debug => $transcript):()),
+                   requester    => $header{from},
+                   request_addr => $controlrequestaddr,
+                   message      => \@log,
+                    affected_packages => \%affected_packages,
+                   recipients   => \%recipients,
+                   summary      => undef,
+                   );
+       };
+       if ($@) {
+           $errors++;
+           print {$transcript} "Failed to mark $ref with summary foo: $@";
+       }
+
+Handles all setting of summary fields
+
+If summary is undef, unsets the summary
+
+If summary is 0, sets the summary to the first paragraph contained in
+the message passed.
+
+If summary is numeric, sets the summary to the message specified.
+
+
+=cut
+
+
+sub summary {
+    my %param = validate_with(params => \@_,
+                             spec   => {bug => {type   => SCALAR,
+                                                regex  => qr/^\d+$/,
+                                               },
+                                        # specific options here
+                                        summary => {type => SCALAR|UNDEF,
+                                                    default => 0,
+                                                   },
+                                        %common_options,
+                                        %append_action_options,
+                                       },
+                            );
+    croak "summary must be numeric or undef" if
+        defined $param{summary} and not $param{summary} =~ /^\d+$/;
+    our $locks = 0;
+    $locks = 0;
+    local $SIG{__DIE__} = sub {
+       if ($locks) {
+           for (1..$locks) { unfilelock(); }
+           $locks = 0;
+       }
+    };
+    my ($debug,$transcript) = __handle_debug_transcript(%param);
+    my (@data);
+    ($locks, @data) = lock_read_all_merged_bugs($param{bug});
+    __handle_affected_packages(data => \@data,%param);
+    print {$transcript} __bug_info(@data);
+    add_recipients(data => \@data,
+                  recipients => $param{recipients}
+                 );
+    # figure out the log that we're going to use
+    my $summary = '';
+    my $summary_msg = '';
+    my $action = '';
+    if (not defined $param{summary}) {
+        # do nothing
+        print {$debug} "Removing summary fields";
+        $action = 'Removed summary';
+    }
+    else {
+        my $log = [];
+        my @records = Debbugs::Log::read_log_records(bug_num => $param{bug});
+        if ($param{summary} == 0) {
+             $log = $param{log};
+             $summary_msg = @records + 1;
+        }
+        else {
+             if (($param{summary} - 1 ) > $#records) {
+                  die "Message number '$param{summary}' exceeds the maximum message '$#records'";
+             }
+             my $record = $records[($param{summary} - 1 )];
+             if ($record->{type} !~ /incoming-recv|recips/) {
+                  die "Message number '$param{summary}' is a invalid message type '$record->{type}'";
+             }
+             $summary_msg = $param{summary};
+             $log = [$record->{text}];
+        }
+        my $p_o = Debbugs::MIME::parse(join('',@{$log}));
+        my $body = $p_o->{body};
+        my $in_pseudoheaders = 0;
+        my $paragraph = '';
+        # walk through body until we get non-blank lines
+        for my $line (@{$body}) {
+             if ($line =~ /^\s*$/) {
+                  if (length $paragraph) {
+                       last;
+                  }
+                  $in_pseudoheaders = 0;
+                  next;
+             }
+             # skip a paragraph if it looks like it's control or
+             # pseudo-headers
+             if ($line =~ m{^\s*(?:(?:Package|Source|Version)\:| #pseudo headers
+                                (?:package|(?:no|)owner|severity|tag|summary| #control
+                                     reopen|close|(?:not|)(?:fixed|found)|clone|
+                                     (?:force|)merge|user(?:category|tag|)
+                                )
+                           )\s+\S}x) {
+                  if (not length $paragraph) {
+                       print {$debug} "Found control/pseudo-headers and skiping them\n";
+                       $in_pseudoheaders = 1;
+                       next;
+                  }
+             }
+             next if $in_pseudoheaders;
+             $paragraph .= $line;
+        }
+        print {$debug} "Summary is going to be '$paragraph'\n";
+        $summary = $paragraph;
+        $summary =~ s/[\n\r]//g;
+        if (not length $summary) {
+             die "Unable to find summary message to use";
+        }
+    }
+    for my $data (@data) {
+        print {$debug} "Going to change summary";
+        if (length $summary) {
+             if (length $data->{summary}) {
+                  $action = "Summary replaced with message bug $param{bug} message $summary_msg";
+             }
+             else {
+                  $action = "Summary recorded from message bug $param{bug} message $summary_msg";
+             }
+        }
+        $data->{summary} = $summary;
+        append_action_to_log(bug => $data->{bug_num},
+                             get_lock => 0,
+                             __return_append_to_log_options(
+                                                            %param,
+                                                            action => $action,
+                                                           ),
+                            )
+              if not exists $param{append_log} or $param{append_log};
+         writebug($data->{bug_num},$data);
+         print {$transcript} "$action\n";
+         add_recipients(data => $data,
+                        recipients => $param{recipients},
+                       );
+     }
+     if ($locks) {
+         for (1..$locks) { unfilelock(); }
+     }
+
+}
+
+
+
+
 =head1 OWNER FUNCTIONS
 
 =head2 owner
@@ -232,6 +570,7 @@ sub owner {
      my (@data);
      ($locks, @data) = lock_read_all_merged_bugs($param{bug});
      __handle_affected_packages(data => \@data,%param);
+     print {$transcript} __bug_info(@data);
      @data and defined $data[0] or die "No bug found for $param{bug}";
      add_recipients(data => \@data,
                    recipients => $param{recipients}
@@ -353,6 +692,7 @@ sub bug_archive {
      my (@data);
      ($locks, @data) = lock_read_all_merged_bugs($param{bug});
      __handle_affected_packages(data => \@data,%param);
+     print {$transcript} __bug_info(@data);
      print {$debug} "$param{bug} read $locks\n";
      @data and defined $data[0] or die "No bug found for $param{bug}";
      print {$debug} "$param{bug} read done\n";
@@ -455,6 +795,7 @@ sub bug_unarchive {
      my @data = ();
      ($locks, @data) = lock_read_all_merged_bugs($param{bug},'archive');
      __handle_affected_packages(data => \@data,%param);
+     print {$transcript} __bug_info(@data);
      print {$debug} "$param{bug} read $locks\n";
      if (not @data or not defined $data[0]) {
         print {$transcript} "No bug found for $param{bug}\n";
@@ -611,6 +952,25 @@ sub __handle_debug_transcript{
      return ($debug,$transcript);
 }
 
+=head2 __bug_info
+
+     __bug_info($data)
+
+Produces a small bit of bug information to kick out to the transcript
+
+=cut
+
+sub __bug_info{
+     my $return = '';
+     for my $data (@_) {
+         $return .= "Bug ".($data->{bug_num}||'').
+              " [".($data->{package}||''). "] ".
+                   ($data->{subject}||'')."\n";
+     }
+     return $return;
+}
+
+
 sub __return_append_to_log_options{
      my %param = @_;
      my $action = $param{action} if exists $param{action};
index 3b3961f90667ec7cbf654a371f49aa8d9399ad6d..0030a7ccda131d9f348816e51e3b4f34ff4049b2 100644 (file)
@@ -100,6 +100,8 @@ my %fields = (originator     => 'submitter',
               blocks         => 'blocks',
               blockedby      => 'blocked-by',
              unarchived     => 'unarchived',
+             summary        => 'summary',
+             affects        => 'affects',
              );
 
 # Fields which need to be RFC1522-decoded in format versions earlier than 3.
index 11c7df8ab9b73dbadb2368032a96f736ada4eadd..2982cfeb9060b5906bfe3d17b05ac2bfbb890616 100644 (file)
@@ -195,7 +195,7 @@ debbugs (2.4.2) UNRELEASED; urgency=low
   * Allow selecting both archived and unarchived bugs (closes: #320175)
   * Support intersecting sets of bugs (closes: #164421)
   * Allow selecting the newest N bugs (closes: #84681)
-  * Add anchor links to specific messages (closes: #431450)
+  * Add anchor links to specific messages (closes: #431459)
   * Add missing newline after indicating what the user is (closes: #432466)
   * Handle src/binary packages with the same name (but different src
     packages) correctly. (closes: #435926)
@@ -217,6 +217,9 @@ debbugs (2.4.2) UNRELEASED; urgency=low
   * Add Text::Template based templating system (closes: #36814)
   * Add new uservalue feature to Debbugs::User
   * Don't serialize things as date/time in soap (closes: #484789)
+  * Link to packages in bugreport page (closes: #229067)
+  * Totally revamp the pkgreport templates (closes: #434504)
+  * Add correspondent option to track bug correpondents (closes: #485804)
 
   
  -- Colin Watson <cjwatson@debian.org>  Fri, 20 Jun 2003 18:57:25 +0100
index 43f58cbceca29eca2d8b002e75c4701d8df34dcd..8c3412575ce60b403d7a343a6d14c1898a135bf9 100644 (file)
@@ -49,6 +49,17 @@ a:link:hover, a:visited:hover {
     color: #d81e1e;
 }
 
+.link span {
+    color: #1b56ce;
+    font-weight: bold;
+    text-decoration: underline;
+}
+
+.link span:hover {
+    color: #d81e1e;
+}
+
+
 a.submitter:link {
     color: #242424;
     font-family: sans-serif;
index df289c9c40406fa20a2df0c83547891c143693b8..52540ef43bebeeaa7e0dd4893f455d21c905ccee 100755 (executable)
@@ -29,7 +29,7 @@ use Debbugs::Versions::Dpkg;
 use Debbugs::Status qw(splitpackages);
 
 use Debbugs::CGI qw(html_escape);
-use Debbugs::Control qw(:archive :log :owner);
+use Debbugs::Control qw(:all);
 use Debbugs::Log qw(:misc);
 use Debbugs::Text qw(:templates);
 
@@ -1013,6 +1013,8 @@ END
            &checkmatch('blocked-by','m_blockedby',$data->{blockedby},@newmergelist);
            &checkmatch('done mark','m_done',length($data->{done}) ? 'done' : 'open',@newmergelist);
            &checkmatch('owner','m_owner',$data->{owner},@newmergelist);
+           &checkmatch('summary','m_summary',$data->{summary},@newmergelist);
+           &checkmatch('affects','m_affects',$data->{affects},@newmergelist);
            foreach my $t (split /\s+/, $data->{keywords}) { $tags{$t} = 1; }
            foreach my $f (@{$data->{found_versions}}) { $found{$f} = 1; }
            foreach my $f (@{$data->{fixed_versions}}) { $fixed{$f} = 1; }
@@ -1101,7 +1103,7 @@ END
                $data->{keywords}= join(' ', keys %tags);
                $data->{found_versions}= [sort keys %found];
                $data->{fixed_versions}= [sort keys %fixed];
-               my @field_list = qw(forwarded package severity blocks blockedby owner done);
+               my @field_list = qw(forwarded package severity blocks blockedby owner done affects summary);
                @{$data}{@field_list} = @{$master_bug_data}{@field_list};
                &savebug;
            }
@@ -1184,9 +1186,57 @@ END
                %limit_pkgs = ();
                print {$transcript} "Not ignoring any bugs.\n\n";
        }
+    } elsif (m/^affects?\s+\#?(-?\d+)(?:\s+((?:[=+-])?)\s*(\S.*)?)?\s*$/i) {
+       $ok++;
+        $ref = $1;
+       my $add_remove = $2 || '';
+       my $packages = $3 || '';
+       $ref = $clonebugs{$ref} if exists $clonebugs{$ref};
+       $bug_affected{$ref} = 1;
+       eval {
+            affects(bug          => $ref,
+                    transcript   => $transcript,
+                    ($dl > 0 ? (debug => $transcript):()),
+                    requester    => $header{from},
+                    request_addr => $controlrequestaddr,
+                    message      => \@log,
+                    recipients   => \%recipients,
+                    packages     => [splitpackages($3)],
+                    ($add_remove eq '+'?(add => 1):()),
+                    ($add_remove eq '-'?(remove => 1):()),
+                   );
+       };
+       if ($@) {
+           $errors++;
+           print {$transcript} "Failed to give $ref a summary: $@";
+       }
+
+    } elsif (m/^summary\s+\#?(-?\d+)\s*(\d+|)\s*$/i) {
+       $ok++;
+        $ref = $1;
+       my $summary_msg = length($2)?$2:undef;
+       $ref = $clonebugs{$ref} if exists $clonebugs{$ref};
+       $bug_affected{$ref} = 1;
+       eval {
+           summary(bug          => $ref,
+                   transcript   => $transcript,
+                   ($dl > 0 ? (debug => $transcript):()),
+                   requester    => $header{from},
+                   request_addr => $controlrequestaddr,
+                   message      => \@log,
+                   recipients   => \%recipients,
+                   summary      => $summary_msg,
+                  );
+       };
+       if ($@) {
+           $errors++;
+           print {$transcript} "Failed to give $ref a summary: $@";
+       }
+
     } elsif (m/^owner\s+\#?(-?\d+)\s+((?:\S.*\S)|\!)\s*$/i) {
        $ok++;
         $ref = $1;
+       $ref = $clonebugs{$ref} if exists $clonebugs{$ref};
        my $newowner = $2;
        if ($newowner eq '!') {
            $newowner = $replyto;
@@ -1203,9 +1253,14 @@ END
                  owner        => $newowner,
                 );
        };
+       if ($@) {
+           $errors++;
+           print {$transcript} "Failed to mark $ref as having an owner: $@";
+       }
     } elsif (m/^noowner\s+\#?(-?\d+)\s*$/i) {
         $ok++;
         $ref = $1;
+       $ref = $clonebugs{$ref} if exists $clonebugs{$ref};
        $bug_affected{$ref} = 1;
        eval {
            owner(bug          => $ref,
@@ -1225,6 +1280,7 @@ END
     } elsif (m/^unarchive\s+#?(\d+)$/i) {
         $ok++;
         $ref = $1;
+        $ref = $clonebugs{$ref} if exists $clonebugs{$ref};
         $bug_affected{$ref} = 1;
         eval {
              bug_unarchive(bug        => $ref,
@@ -1243,6 +1299,7 @@ END
     } elsif (m/^archive\s+#?(\d+)$/i) {
         $ok++;
         $ref = $1;
+        $ref = $clonebugs{$ref} if exists $clonebugs{$ref};
         $bug_affected{$ref} = 1;
         eval {
              bug_archive(bug => $ref,
index ccf1ee7924e8abdfd0450bbe802b61431caf0855..857c97c1d1b668a9228336546356672f442c32b1 100644 (file)
@@ -1,7 +1,7 @@
 # -*- mode: cperl;-*-
 # $Id: 05_mail.t,v 1.1 2005/08/17 21:46:17 don Exp $
 
-use Test::More tests => 66;
+use Test::More tests => 78;
 
 use warnings;
 use strict;
@@ -196,6 +196,26 @@ my @control_commands =
                       status_key => 'owner',
                       status_value => '',
                      },
+      summary      => {command => 'summary',
+                      value   => '5',
+                      status_key => 'summary',
+                      status_value => 'This is a silly bug',
+                     },
+      nosummary    => {command => 'summary',
+                      value   => '',
+                      status_key => 'summary',
+                      status_value => '',
+                     },
+      affects      => {command => 'affects',
+                      value   => 'foo',
+                      status_key => 'affects',
+                      status_value => 'foo',
+                     },
+      noaffects    => {command => 'affects',
+                      value   => '',
+                      status_key => 'affects',
+                      status_value => '',
+                     },
       close        => {command => 'close',
                       value   => '',
                       status_key => 'done',
index 6bd16e084676beab2ba0be041c06a7768552f7cc..17f0004123ed2bfe608f9a85ce7493aa6e515f78 100644 (file)
@@ -59,4 +59,9 @@
      $output .= q(<p>Bug is archived. No further changes may be made.<p>)
   }
   $output
+}{ my $output = '';
+  if (exists $status{summary} and defined $status{summary} and length $status{summary}) {
+     $output .= q(<p>).html_escape($status{summary}).q(</p>);
+  }
+  $output;
 }</div>
index 8250930734387354611198041814896f0a5a07ab..30345797f09989ad92608fa1352185a503b4b407 100644 (file)
@@ -1,6 +1,6 @@
 <div class="shortbugstatus">
   <a href="{html_escape(bug_links(bug=>$status{bug_num},links_only=>1))}"{length($status{done})?' style="text-decoration:line-through"':''}>#{html_escape($status{bug_num})}</a>
-  [<font face="fixed"><a href="javascript:extra_status_visible({html_escape($status{bug_num})})">{
+  [<font face="fixed"><span class="link" onclick="javascript:extra_status_visible({html_escape($status{bug_num})})">{
   my $output = qq(<span title="$status{severity}">);
   my $temp = $status{severity};
   $temp = substr $temp,0,1;
@@ -37,7 +37,7 @@
      $output .= qq(<span title="archived">♲</span>);
   }
   $output;
-  }</a></font>]
+  }</span></font>]
   [{package_links(package=>$status{package},options=>\%options,class=>"submitter")}]
   <a href="{html_escape(bug_links(bug=>$status{bug_num},links_only=>1))}">{html_escape($status{subject})}</a>
   <div id="extra_status_{html_escape($status{bug_num})}" class="shortbugstatusextra">
@@ -66,7 +66,7 @@
          version_url(package => $status{package},
                      found   => $status{found_versions},
                      fixed   => $status{fixed_versions},
-                    ).'") ';
+                    ).'"> ';
  }
  if (@{$status{found_versions}}) {
     $output .= q(<span>Found in );