[Rt-commit] [rtir] 01/03: ValidateCustomFields now calculates a NamePrefix based on Object

Kevin Falcone falcone at bestpractical.com
Thu Apr 24 12:49:07 EDT 2014


This is an automated email from the git hooks/post-receive script.

falcone pushed a commit to branch master
in repository rtir.

commit 2c5c44c62d39e92dd19033483c6c9a77295c623c
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Apr 23 15:41:28 2014 -0400

    ValidateCustomFields now calculates a NamePrefix based on Object
    
    The default is to use RT::Ticket as the Object, so if you want
    Transaction Custom Fields validated, you must pass an RT::Transaction.
    
    Lifted from share/html/Ticket/Update.html in core, since that's the only
    real code which validates Transaction Custom Fields.
---
 html/RTIR/Create.html | 1 +
 html/RTIR/Update.html | 1 +
 2 files changed, 2 insertions(+)

diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index 9bd79ce..bcb44b3 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -441,6 +441,7 @@ unless ( $skip_create ) {
         CustomFields => $QueueObj->TicketTransactionCustomFields,
         ARGSRef      => \%ARGS,
         NamePrefix   => "Object-RT::Transaction--CustomField-",
+        Object       => RT::Transaction->new( $session{CurrentUser} )
     );
     unless ( $ticket_status && $txn_status ) {
         push @results, loc( "Invalid value(s) of the custom fields" );
diff --git a/html/RTIR/Update.html b/html/RTIR/Update.html
index 3c5d317..072ed4d 100644
--- a/html/RTIR/Update.html
+++ b/html/RTIR/Update.html
@@ -204,6 +204,7 @@ if ( $SubmitTicket ) {
         CustomFields => $Ticket->QueueObj->TicketTransactionCustomFields,
         ARGSRef      => \%ARGS,
         NamePrefix   => "Object-RT::Transaction--CustomField-",
+        Object       => RT::Transaction->new( $session{CurrentUser} ),
     );
     unless ( $status ) {
         push @results, loc( "Invalid value(s) of the custom fields" );

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list