summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2016-04-11 10:01:00 -0500
committerJonathan Prykop <jonathan@freeside.biz>2016-04-11 10:30:25 -0500
commit6aecb23afe1e96c2eb4438a9be0ee76dd70250dd (patch)
tree3577a5ec3483342afa0dc040a4190ab45aa2cf50 /httemplate/misc
parent5b77b3d0c9aa2d0fa15ca5284d7e34ed68f4ee12 (diff)
RT#34237: installer scheduling [fix steal]
Diffstat (limited to 'httemplate/misc')
-rw-r--r--httemplate/misc/xmlhttp-ticket-update.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/httemplate/misc/xmlhttp-ticket-update.html b/httemplate/misc/xmlhttp-ticket-update.html
index e81e353c5..8735eecab 100644
--- a/httemplate/misc/xmlhttp-ticket-update.html
+++ b/httemplate/misc/xmlhttp-ticket-update.html
@@ -13,7 +13,13 @@ my $ticket = FS::TicketSystem->get_ticket_object( \%session, ticket_id=>$id );
my $return;
if ( $ticket ) {
- my($orv, $omsg) = $ticket->SetOwner( $username );
+ my $curowner = $ticket->OwnerObj->Name;
+ my($orv, $omsg);
+ if (( $curowner eq $FS::CurrentUser::CurrentUser->username ) or ( $curowner eq 'nobody' )) {
+ ($orv, $omsg) = $ticket->SetOwner( $username );
+ } else {
+ ($orv, $omsg) = $ticket->SetOwner( $username, 'Steal' );
+ }
$orv = 1 if ! $orv && $omsg =~ /already own/i;
if ( $orv ) {