From a0cc521d887ec8ada2800ee778b05a46e6002fa6 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 29 Nov 2007 00:41:56 -0800 Subject: [PATCH] * Add more debbugging output to Debbugs::Status --- Debbugs/Status.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm index b4baa48..360cf38 100644 --- a/Debbugs/Status.pm +++ b/Debbugs/Status.pm @@ -616,11 +616,17 @@ sub bug_archiveable{ my $status = $param{status}; if (not exists $param{status} or not defined $status) { $status = read_bug(bug=>$param{bug}); - return undef if not defined $status; + if (not defined $status) { + print STDERR "Cannot archive $param{bug} because it does not exist\n" if $DEBUG; + return undef; + } } # Bugs can be archived if they are # 1. Closed - return $cannot_archive if not defined $status->{done} or not length $status->{done}; + if (not defined $status->{done} or not length $status->{done}) { + print STDERR "Cannot archive $param{bug} because it is not done\n"; + return $cannot_archive + } # If we just are checking if the bug can be archived, we'll not even bother # checking the versioning information if the bug has been -done for less than 28 days. my $log_file = getbugcomponent($param{bug},'log'); @@ -728,6 +734,7 @@ sub bug_archiveable{ # 6. at least 28 days have passed since the last action has occured or the bug was closed my $age = ceil($max_log_age); if ($age > 0 or $min_archive_days > 0) { + print STDERR "Cannot archive $param{bug} because not enough days have passed\n" if $DEBUG; return $param{days_until}?max($age,$min_archive_days):0; } else { -- 2.39.2