X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FTicket%2FCreate.html;h=bd60b5c98585361dc9e51476bec66839d5f8de07;hb=ed1f84b4e8f626245995ecda5afcf83092c153b2;hp=f29dfbbcf5af40717c3e78b1170923d229bdb4d4;hpb=85e677b86fc37c54e6de2b06340351a28f5a5916;p=freeside.git diff --git a/rt/share/html/Ticket/Create.html b/rt/share/html/Ticket/Create.html index f29dfbbcf..bd60b5c98 100755 --- a/rt/share/html/Ticket/Create.html +++ b/rt/share/html/Ticket/Create.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -66,7 +66,6 @@
<&| /Widgets/TitleBox, title => loc("Basics"), class=>'ticket-info-basics' &> - <& /Ticket/Elements/EditBasics, InTable => 1, @@ -106,8 +105,8 @@ % $m->callback( CallbackName => 'AfterOwner', ARGSRef => \%ARGS ); - <& /Ticket/Elements/EditCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1 &> - <& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1 &> + <& /Ticket/Elements/EditCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1, KeepValue => 1 &> + <& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1, KeepValue => 1 &>
% $m->callback( CallbackName => 'AfterBasics', QueueObj => $QueueObj, ARGSRef => \%ARGS ); @@ -294,8 +293,8 @@ if ($CloneTicket) { }; $clone->{$_} = $CloneTicketObj->$_() - for qw/Owner Subject FinalPriority TimeEstimated TimeWorked - Status TimeLeft/; + for qw/Owner Subject FinalPriority Status/; + # not TimeWorked, TimeEstimated, or TimeLeft $clone->{$_} = $CloneTicketObj->$_->AsString for grep { $CloneTicketObj->$_->Unix } @@ -331,14 +330,21 @@ if ($CloneTicket) { my $cfs = $CloneTicketObj->QueueObj->TicketCustomFields(); while ( my $cf = $cfs->Next ) { + next if $cf->FirstAttribute('NoClone'); my $cf_id = $cf->id; my $cf_values = $CloneTicketObj->CustomFieldValues( $cf->id ); my @cf_values; while ( my $cf_value = $cf_values->Next ) { push @cf_values, $cf_value->Content; } - $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} = join "\n", - @cf_values; + + if ( @cf_values > 1 && $cf->Type eq 'Select' ) { + $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} = \@cf_values; + } + else { + $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} = join "\n", + @cf_values; + } } # Pass customer links along (even though cloning of parent links @@ -376,32 +382,7 @@ my $ValidCFs = $m->comp( ARGSRef => \%ARGS ); -# deal with deleting uploaded attachments -foreach my $key (keys %ARGS) { - if ($key =~ m/^DeleteAttach-(.+)$/) { - delete $session{'Attachments'}{$1}; - } - $session{'Attachments'} = { %{$session{'Attachments'} || {}} }; -} - -# store the uploaded attachment in session -if ( defined $ARGS{'Attach'} && length $ARGS{'Attach'} ) { # attachment? - my $attachment = MakeMIMEEntity( - AttachmentFieldName => 'Attach' - ); - - my $file_path = Encode::decode_utf8("$ARGS{'Attach'}"); - $session{'Attachments'} = { - %{$session{'Attachments'} || {}}, - $file_path => $attachment, - }; -} - -# delete temporary storage entry to make WebUI clean -unless (keys %{$session{'Attachments'}} and - ($ARGS{'id'} eq 'new' or $ARGS{'id'} eq 'refresh')) { - delete $session{'Attachments'}; -} +ProcessAttachments(ARGSRef => \%ARGS); my $checks_failure = 0;