Master to 4.2.8
[usit-rt.git] / share / html / Ticket / Create.html
index 3beb6e7..ab5f271 100644 (file)
           CustomFields => $QueueObj->TicketCustomFields,
           Grouping => 'Basics',
           InTable => 1,
+          KeepValue => 1,
       &>
-      <& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1 &>
+      <& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1, KeepValue => 1, &>
     </table>
   </&>
 % $m->callback( CallbackName => 'AfterBasics', QueueObj => $QueueObj, ARGSRef => \%ARGS );
     %ARGS,
     Object => $ticket,
     CustomFieldGenerator => sub { $QueueObj->TicketCustomFields },
+    KeepValue => 1,
 &>
 
 </div>
     CustomFields => $QueueObj->TicketCustomFields,
     Grouping => 'People',
     InTable => 1,
+    KeepValue => 1,
 &>
 
 <tr>
     CustomFields => $QueueObj->TicketCustomFields,
     Grouping => 'Dates',
     InTable => 1,
+    KeepValue => 1,
 &>
 </table>
 </&>
@@ -312,7 +316,7 @@ if ($CloneTicket) {
         Status TimeLeft/;
 
     $clone->{$_} = $CloneTicketObj->$_->AsString
-        for grep { $CloneTicketObj->$_->Unix }
+        for grep { $CloneTicketObj->$_->IsSet }
         map      { $_ . "Obj" } qw/Starts Started Due Resolved/;
 
     my $get_link_value = sub {
@@ -352,10 +356,10 @@ if ($CloneTicket) {
         }
 
         if ( @cf_values > 1 && $cf->Type eq 'Select' ) {
-            $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} = \@cf_values;
+            $clone->{GetCustomFieldInputName( CustomField => $cf )} = \@cf_values;
         }
         else {
-            $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} = join "\n",
+            $clone->{GetCustomFieldInputName( CustomField => $cf )} = join "\n",
               @cf_values;
         }
     }