diff options
Diffstat (limited to 'rt/lib/RT/Action/CreateTickets.pm')
-rw-r--r-- | rt/lib/RT/Action/CreateTickets.pm | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/rt/lib/RT/Action/CreateTickets.pm b/rt/lib/RT/Action/CreateTickets.pm index b708f2e..68f402e 100644 --- a/rt/lib/RT/Action/CreateTickets.pm +++ b/rt/lib/RT/Action/CreateTickets.pm @@ -1,8 +1,8 @@ -# BEGIN BPS TAGGED BLOCK {{{ +# {{{ BEGIN BPS TAGGED BLOCK # # COPYRIGHT: # -# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC # <jesse@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ # works based on those contributions, and sublicense and distribute # those contributions and any derivatives thereof. # -# END BPS TAGGED BLOCK }}} +# }}} END BPS TAGGED BLOCK package RT::Action::CreateTickets; require RT::Action::Generic; @@ -148,8 +148,8 @@ A convoluted example push (@admins, $admin->EmailAddress); } } - Queue: ___Approvals - Type: approval + Queue: Approvals + Type: Approval AdminCc: {join ("\nAdminCc: ",@admins) } Depended-On-By: TOP Refers-To: TOP @@ -164,7 +164,7 @@ A convoluted example Subject: Manager approval Depended-On-By: TOP Refers-On: {$Tickets{"approval"}->Id} - Queue: ___Approvals + Queue: Approvals Content-Type: text/plain Content: Your approval is requred for this ticket, too. @@ -213,7 +213,7 @@ A complete list of acceptable fields for this beastie: Fields marked with an * are required. -Fields marked with a + may have multiple values, simply +Fields marked with a + man have multiple values, simply by repeating the fieldname on a new line with an additional value. Fields marked with a ! are postponed to be processed after all @@ -243,8 +243,8 @@ ok ($approvalsq->Id, "Created Approvals test queue"); my $approvals = '===Create-Ticket: approval -Queue: ___Approvals -Type: approval +Queue: Approvals +Type: Approval AdminCc: {join ("\nAdminCc: ",@admins) } Depended-On-By: {$Tickets{"TOP"}->Id} Refers-To: TOP @@ -258,7 +258,7 @@ ENDOFCONTENT ===Create-Ticket: two Subject: Manager approval. Depended-On-By: approval -Queue: ___Approvals +Queue: Approvals Content-Type: text/plain Content: Your minion approved ticket {$Tickets{"TOP"}->Id}. you ok with that? @@ -565,14 +565,12 @@ sub CreateByTemplate { # XXX: cargo cult programming that works. i'll be back. use bytes; - local %T::Tickets = %T::Tickets; - local $T::TOP = $T::TOP; - local $T::ID = $T::ID; - $T::Tickets{'TOP'} = $T::TOP = $top if $top; + %T::Tickets = (); my $ticketargs; my ( @links, @postponed ); foreach my $template_id ( @{ $self->{'create_tickets'} } ) { + $T::Tickets{'TOP'} = $T::TOP = $top if $top; $RT::Logger->debug("Workflow: processing $template_id of $T::TOP") if $T::TOP; @@ -630,8 +628,7 @@ sub UpdateByTemplate { use bytes; my @results; - local %T::Tickets = %T::Tickets; - local $T::ID = $T::ID; + %T::Tickets = (); my $ticketargs; my ( @links, @postponed ); |