fix dragging a ticket to yourself, RT#34237
authorIvan Kohler <ivan@freeside.biz>
Thu, 3 Dec 2015 07:17:17 +0000 (23:17 -0800)
committerIvan Kohler <ivan@freeside.biz>
Thu, 3 Dec 2015 07:17:17 +0000 (23:17 -0800)
httemplate/misc/xmlhttp-ticket-update.html

index 147fbef..ed54f31 100644 (file)
@@ -16,13 +16,14 @@ my $return;
 if ( $ticket ) {
 
   my($orv, $omsg) = $ticket->SetOwner( $username, 'Steal' );
-  $orv = 1 if ! $orv && $omsg =~ /already owns/i;
+  $orv = 1 if ! $orv && $omsg =~ /already own/i;
 
   if ( $orv ) {
 
     my $date = RT::Date->new( $session{CurrentUser} );
     $date->Set( Format=>'unix', Value=>$starts, );
     my($srv, $smsg) = $ticket->SetStarts( $date->ISO );
+    $srv = 1 if ! $srv && /already the current value/i;
 
     my $ddate;
     unless ( ! $srv ) {