[Rt-commit] rt branch, 4.4/untake-action, updated. rt-4.4.2-92-g63b70a8

Craig Kaiser craig at bestpractical.com
Thu Dec 14 17:37:58 EST 2017


The branch, 4.4/untake-action has been updated
       via  63b70a8a68583285b6f817dbe51145ad12e45025 (commit)
      from  a616510c100a30d769bf7cb94c84e1ba132e4d4c (commit)

Summary of changes:
 lib/RT/Interface/Web/MenuBuilder.pm | 5 ++++-
 share/html/Ticket/Display.html      | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 63b70a8a68583285b6f817dbe51145ad12e45025
Author: Craig Kaiser <craig at bestpractical.com>
Date:   Thu Dec 14 17:37:12 2017 -0500

    Add Untake action to actions tab on ticket display
    
    Setting Owner to Nobody is not obvious to all users as
    the way to give a ticket back without assigning to another
    RT user. Provide the Untake action menu option to make this
    discoverable and easy.

diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index d68ad6c..beba328 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -358,15 +358,18 @@ sub BuildMainNav {
                     my $key = $info->{'label'} || ucfirst($next);
                     $actions->child( $key => title => loc( $key ), path => $url);
                 }
-
                 my ($can_take, $tmsg) = $obj->CurrentUserCanSetOwner( Type => 'Take' );
                 my ($can_steal, $smsg) = $obj->CurrentUserCanSetOwner( Type => 'Steal' );
+                my ($can_untake, $umsg) = $obj->CurrentUserCanSetOwner( Type => 'Untake' );
                 if ( $can_take ){
                     $actions->child( take => title => loc('Take'), path => "/Ticket/Display.html?Action=Take;id=" . $id );
                 }
                 elsif ( $can_steal ){
                     $actions->child( steal => title => loc('Steal'), path => "/Ticket/Display.html?Action=Steal;id=" . $id );
                 }
+                elsif ( $can_untake ){
+                       $actions->child( untake => title => loc('Untake'), path => "/Ticket/Display.html?Action=Untake;id=" . $id );
+                }
 
                 # TODO needs a "Can extract article into a class applied to this queue" check
                 $actions->child( 'extract-article' =>
diff --git a/share/html/Ticket/Display.html b/share/html/Ticket/Display.html
index 846e441..f992a1e 100644
--- a/share/html/Ticket/Display.html
+++ b/share/html/Ticket/Display.html
@@ -168,7 +168,7 @@ if ($ARGS{'id'} eq 'new') {
         return if $SkipProcessing;
 
         if ( defined $ARGS{'Action'} ) {
-            if ($ARGS{'Action'} =~ /^(Steal|Delete|Take|SetTold)$/) {
+            if ($ARGS{'Action'} =~ /^(Steal|Delete|Take|Untake|SetTold)$/) {
                 my $action = $1;
                 my ($res, $msg) = $TicketObj->$action();
                 push(@Actions, $msg);

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


More information about the rt-commit mailing list