[Bps-public-commit] RT-BugTracker-Public branch, rt4, updated. 0c72bf195d2ebc4e878b536f94f44f7825590d9a

Thomas Sibley trs at bestpractical.com
Thu Apr 4 20:54:54 EDT 2013


The branch, rt4 has been updated
       via  0c72bf195d2ebc4e878b536f94f44f7825590d9a (commit)
      from  8dd432467ab84ff8cbddb0ca77cba53d19feba12 (commit)

Summary of changes:
 .../BugTracker-Public/Elements/Tabs/Privileged      | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 0c72bf195d2ebc4e878b536f94f44f7825590d9a
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Apr 4 17:54:35 2013 -0700

    Provide a quick link to explicitly re-open a bug

diff --git a/html/Callbacks/BugTracker-Public/Elements/Tabs/Privileged b/html/Callbacks/BugTracker-Public/Elements/Tabs/Privileged
index 0a51390..3b85f1a 100644
--- a/html/Callbacks/BugTracker-Public/Elements/Tabs/Privileged
+++ b/html/Callbacks/BugTracker-Public/Elements/Tabs/Privileged
@@ -50,14 +50,14 @@ if ($session{CurrentUser}->Name eq RT->Config->Get("WebPublicUser")) {
     Menu->child("preferences", menu => $preferences);
 }
 
-my $queue;
+my ($queue, $ticket);
 my $request_path = $HTML::Mason::Commands::r->path_info;
    $request_path =~ s!^/{2,}!/!;
 
 if ( $request_path =~ m{^/Public/Bug/(?:Display|Update)\.html}
      and my $id = $DECODED_ARGS->{id} )
 {
-    my $ticket = RT::Ticket->new( $session{CurrentUser} );
+    $ticket = RT::Ticket->new( $session{CurrentUser} );
     $ticket->Load($id);
     $queue = $ticket->QueueObj if $ticket->id;
 }
@@ -89,5 +89,22 @@ if ( $queue and $queue->id ) {
             title => loc("Report a new bug"),
             path  => '/Public/Bug/Report.html?Queue='. $escaped,
     );
+
+    if ($ticket and $ticket->id
+        and $queue->Lifecycle->IsInactive($ticket->Status)
+        and $ticket->CurrentUserHasRight("OpenTicket")) {
+
+        PageMenu->child(
+            "reopen",
+            title       => loc("Re-open this bug"),
+            path        => "/Public/Bug/Display.html?Status=open;id=".$ticket->id,
+            sort_order  => -2,
+        );
+        PageMenu->child(
+            "ticket-queue-separator",
+            raw_html    => "<span style='display: block; padding: 0.75em 1em'>—</span>",
+            sort_order  => -1,
+        );
+    }
 }
 </%init>

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list