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

Kevin Falcone falcone at bestpractical.com
Mon Apr 14 12:57:23 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 4d8f055aea2ff2b72fcde841c85f65d22b0f74d5
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/Incident/Elements/Create      | 3 ++-
 html/RTIR/Investigation/Elements/Create | 4 +++-
 3 files changed, 8 insertions(+), 3 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/Incident/Elements/Create b/html/RTIR/Incident/Elements/Create
index e3aa195..912907b 100644
--- a/html/RTIR/Incident/Elements/Create
+++ b/html/RTIR/Incident/Elements/Create
@@ -71,13 +71,14 @@
 
 <& /RTIR/Elements/EditCustomFields,
     %ARGS,
-    TicketObj    => undef,
+    TicketObj    => $ticket,
     QueueObj     => $QueueObj,
     DefaultsFrom => $ChildObj,
 &>
 
 <%INIT>
 my $constituency_cf = RT::IR->CustomFields( 'Constituency', Queue => $QueueObj->Name );
+my $ticket = RT::Ticket->new($session{'CurrentUser'}); # empty object for EditCustomFields
 </%INIT>
 <%ARGS>
 $NamePrefix => ''
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