[freeside-commits] branch master updated. 4c4bf4f91c1bb61c85b1e73d0eddad20708fd89c

Jonathan Prykop jonathan at 420.am
Mon Apr 11 08:01:19 PDT 2016


The branch, master has been updated
       via  4c4bf4f91c1bb61c85b1e73d0eddad20708fd89c (commit)
      from  19c77bd46e3d0155b9f2a1afb7a3c488bc050f65 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4c4bf4f91c1bb61c85b1e73d0eddad20708fd89c
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Mon Apr 11 10:01:00 2016 -0500

    RT#34237: installer scheduling [fix steal]

diff --git a/httemplate/misc/xmlhttp-ticket-update.html b/httemplate/misc/xmlhttp-ticket-update.html
index e81e353..8735eec 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 ) {

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

Summary of changes:
 httemplate/misc/xmlhttp-ticket-update.html |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list