[Rt-commit] [rtir] 04/09: EditCustomFields needs an object

Kevin Falcone falcone at bestpractical.com
Wed Apr 9 17:53:31 EDT 2014


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

falcone pushed a commit to branch 3.2/incident-investigation-updates
in repository rtir.

commit 3985309b5125c0669e80da77e3ccbc9d87762b8b
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Mar 7 16:10:15 2014 -0500

    EditCustomFields needs an object
---
 html/RTIR/Incident/Create.html          | 4 +++-
 html/RTIR/Investigation/Elements/Create | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 213881d..da51898 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -154,7 +154,7 @@ if ( $ChildObj && !$ChildObj->CurrentUserHasRight('ModifyTicket') ) {
 
 <& /RTIR/Elements/EditCustomFields, 
     %ARGS,
-    TicketObj    => undef,
+    TicketObj    => $ticket,
     QueueObj     => $QueueObj,
     DefaultsFrom => $SplitObj || $ChildObj,
 &>
@@ -308,6 +308,8 @@ $m->callback(
 my $QueueObj = RT::Queue->new( $session{'CurrentUser'} );
 $QueueObj->Load( 'Incidents' ) || Abort( loc("Queue could not be loaded.") );
 
+my $ticket = RT::Ticket->new($session{'CurrentUser'}); # empty ticket object
+
 $m->comp( '/RTIR/Create.html:ProcessAttachments', %ARGS );
 
 my $checks_failure = 0;
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index dc37a64..d5cabf4 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -96,7 +96,7 @@
 % if ( ($QueueObj || $TicketObj) && !$SkipField{'CustomFields'} ) {
 <& /RTIR/Elements/EditCustomFields,
     %ARGS,
-    TicketObj  => undef,
+    TicketObj  => $ticket,
     NamePrefix => $NamePrefix,
     QueueObj   => $QueueObj,
     DefaultsFrom => $TicketObj,
@@ -212,6 +212,8 @@ unless ( $QueueObj ) {
     }
 }
 
+my $ticket = RT::Ticket->new($session{'CurrentUser'}); # empty ticket object
+
 if ( RT->Config->Get('GnuPG')->{'Enable'} ) {
     foreach ( qw(Sign Encrypt) ) {
         $ARGS{ $NamePrefix . $_ } = $m->comp( '/Widgets/Form/Boolean:Process',

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


More information about the rt-commit mailing list