%args> $id => undef $comment => undef %args> <%init> my $post = RT::Ticket->new( $session{'CurrentUser'} ); my @Actions; if ( $ARGS{'id'} eq 'new' ) { # new ticket? my $q = RT::Queue->new( $session{'CurrentUser'} ); $q->Load($RT::JournalQueue); $ARGS{'Queue'} = $q->id; $ARGS{'Owner'} = $session{'CurrentUser'}->id; $ARGS{'Status'} = 'new'; my $cat = RT::CustomField->new( $session{'CurrentUser'} ); $cat->LoadByNameAndQueue( Queue => $q->Id, Name => 'RT::Journal-Category'); $ARGS{ 'CustomField-' . $cat->Id } = $ARGS{'Category'}; #$ARGS{'Attachments'}{'Upload'} = $ARGS{'Attach'}; delete $ARGS{'Attach'}; ( $post, @Actions ) = CreateTicket(%ARGS); } else { $post->Load($id); if ($comment) { $post->Correspond( Content => $comment ); } } %init> %$m->comp( 'Elements/Tabs', Title => $post->CreatorObj->Name.": ".$post->Subject );