[Rt-commit] rt branch, 4.4/trunk-untake-action, created. rt-4.4.2-57-g286c20f
Craig Kaiser
craig at bestpractical.com
Tue Dec 19 10:40:50 EST 2017
The branch, 4.4/trunk-untake-action has been created
at 286c20f2a0ebb97730da3c233d7eb8c8bc3d2402 (commit)
- Log -----------------------------------------------------------------
commit 286c20f2a0ebb97730da3c233d7eb8c8bc3d2402
Author: Craig Kaiser <craig at bestpractical.com>
Date: Tue Dec 19 10:36:51 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/share/html/Elements/Tabs b/share/html/Elements/Tabs
index c21ba4d..0b6742d 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -848,12 +848,16 @@ my $build_main_nav = sub {
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