]> git.donarmstrong.com Git - debbugs.git/commitdiff
add bug_status command to Debbugs::Common
authorDon Armstrong <don@donarmstrong.com>
Thu, 19 Feb 2009 05:04:45 +0000 (21:04 -0800)
committerDon Armstrong <don@donarmstrong.com>
Thu, 19 Feb 2009 05:04:45 +0000 (21:04 -0800)
Debbugs/Common.pm

index aaa8db19221510b89c7cf87e3acd1191568af44c..2044304f9a6a0e8b003ae561034ec5e3172a123d 100644 (file)
@@ -40,6 +40,7 @@ BEGIN{
      @EXPORT = ();
      %EXPORT_TAGS = (util   => [qw(getbugcomponent getbuglocation getlocationpath get_hashname),
                                qw(appendfile buglog getparsedaddrs getmaintainers),
+                               qw(bug_status),
                                qw(getmaintainers_reverse),
                                qw(getpseudodesc),
                               ],
@@ -177,6 +178,23 @@ sub buglog {
     return undef;
 }
 
+=head2 bug_status
+
+     bug_status($bugnum)
+
+
+Returns the path to the summary file corresponding to the bug.
+
+Returns undef if the bug does not exist.
+
+=cut
+
+sub bug_status{
+    my ($bugnum) = @_;
+    my $location = getbuglocation($bugnum, 'summary');
+    return getbugcomponent($bugnum, 'summary', $location) if ($location);
+    return undef;
+}
 
 =head2 appendfile