]> git.donarmstrong.com Git - debbugs.git/commitdiff
* remove debugging code in pkgreport.cgi that snuck in
authorDon Armstrong <don@donarmstrong.com>
Sat, 16 Jun 2007 17:27:53 +0000 (18:27 +0100)
committerDon Armstrong <don@donarmstrong.com>
Sat, 16 Jun 2007 17:27:53 +0000 (18:27 +0100)
 * Fix ordering in vercmp for reopen
 * Test that reopen actually works

cgi/pkgreport.cgi
scripts/service.in
t/06_mail_handling.t

index 8b9af3a96212ec328d95db630e61e588728b961b..8a3f300042c07beb99f125b7a220254d472a9fce 100755 (executable)
@@ -734,7 +734,6 @@ sub pkg_htmlizebugs {
         $html .= pkg_htmlindexentrystatus(\%status) . "\n";
        push @status, [ $bug, \%status, $html ];
     }
-    print STDERR "nbnug_order: $bug_order\n";
     if ($bug_order eq 'age') {
         # MWHAHAHAHA
         @status = sort {$a->[1]{log_modified} <=> $b->[1]{log_modified}} @status;
index a161f89c58a46a4ddb09617405ca368961fd6bc7..74768f34f72d8625108bd093af0b21b25f19ada8 100755 (executable)
@@ -562,7 +562,7 @@ END
                         addfoundversions($data, $data->{package}, $version, 'binary');
                        my @fixed_order = sort {Debbugs::Versions::Dpkg::vercmp($a,$b);}
                             @{$data->{fixed_versions}};
-                       if (not @fixed_order or (vercmp($fixed_order[-1],$version) >= 0)) {
+                       if (not @fixed_order or (Debbugs::Versions::Dpkg::vercmp($version,$fixed_order[-1]) >= 0)) {
                             $data->{done} = '';
                        }
                     } else {
index 4f8e89d9396be86610286fd418fa741872ce3076..959b80208aea11b9d1d261459cdfbfe35444f20e 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 => 52;
+use Test::More tests => 64;
 
 use warnings;
 use strict;
@@ -155,6 +155,26 @@ my @control_commands =
                             status_key => 'fixed_versions',
                             status_value => [],
                            },
+      'found_1.0~5+1b2'  => {command => 'found',
+                            value   => '1.0~5+1b2',
+                            status_key => 'found_versions',
+                            status_value => ['1.0~5+1b2'],
+                           },
+      'fixed_1.2'        => {command => 'fixed',
+                            value   => '1.2',
+                            status_key => 'fixed_versions',
+                            status_value => ['1.2'],
+                           },
+      close              => {command => 'close',
+                            value   => '',
+                            status_key => 'done',
+                            status_value => 'foo@bugs.something',
+                           },
+      'found_1.3'        => {command => 'found',
+                            value   => '1.3',
+                            status_key => 'done',
+                            status_value => '',
+                           },
       submitter_foo      => {command => 'submitter',
                             value   => 'foo@bar.com',
                             status_key => 'originator',