[freeside-commits] freeside/rt/lib/RT Ticket_Vendor.pm, 1.3, 1.4 Transaction_Vendor.pm, 1.1, 1.2

Mark Wells mark at wavetail.420.am
Mon Oct 24 15:50:50 PDT 2011


Update of /home/cvs/cvsroot/freeside/rt/lib/RT
In directory wavetail.420.am:/tmp/cvs-serv2189/rt/lib/RT

Modified Files:
	Ticket_Vendor.pm Transaction_Vendor.pm 
Log Message:
record support time even without comment text, #14837

Index: Ticket_Vendor.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/lib/RT/Ticket_Vendor.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- Ticket_Vendor.pm	23 Aug 2011 21:45:50 -0000	1.3
+++ Ticket_Vendor.pm	24 Oct 2011 22:50:46 -0000	1.4
@@ -13,6 +13,37 @@
   $Ticket->SUPER::SetPriority($value);
 }
 
+=head2 Touch
+
+Creates a Touch transaction (a null transaction).  Like Comment and 
+Correspond but without any content.
+
+=cut
+
+sub Touch {
+    my $self = shift;
+    my %args = (
+        TimeTaken => 0,
+        ActivateScrips => 1,
+        CommitScrips => 1,
+        CustomFields => {},
+        @_
+    );
+    unless ( $self->CurrentUserHasRight('ModifyTicket')
+              or $self->CurrentUserHasRight('CommentOnTicket')
+              or $self->CurrentUserHasRight('ReplyToTicket')) {
+        return ( 0, $self->loc("Permission Denied"));
+    }
+    $self->_NewTransaction(
+        Type => 'Touch',
+        TimeTaken => $args{'TimeTaken'},
+        ActivateScrips => $args{'ActivateScrips'},
+        CommitScrips => $args{'CommitScrips'},
+        CustomFields => $args{'CustomFields'},
+    );
+}
+
+
 =head2 MissingRequiredFields {
 
 Return all custom fields with the Required flag set for which this object

Index: Transaction_Vendor.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/lib/RT/Transaction_Vendor.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- Transaction_Vendor.pm	23 Aug 2011 21:45:50 -0000	1.1
+++ Transaction_Vendor.pm	24 Oct 2011 22:50:47 -0000	1.2
@@ -31,5 +31,7 @@
     }
 };
 
+$_BriefDescriptions{'Touch'} = sub { 'Updated' };
+
 1;
 



More information about the freeside-commits mailing list