diff options
Diffstat (limited to 'rt/lib/RT/Action')
| -rw-r--r-- | rt/lib/RT/Action/AutoOpen.pm | 2 | ||||
| -rw-r--r-- | rt/lib/RT/Action/CreateTickets.pm | 20 | 
2 files changed, 12 insertions, 10 deletions
| diff --git a/rt/lib/RT/Action/AutoOpen.pm b/rt/lib/RT/Action/AutoOpen.pm index ea6da1952..7c8c2b89d 100644 --- a/rt/lib/RT/Action/AutoOpen.pm +++ b/rt/lib/RT/Action/AutoOpen.pm @@ -67,7 +67,7 @@ sub Commit {        my $oldstatus = $self->TicketObj->Status();          $self->TicketObj->__Set( Field => 'Status', Value => 'open' );          $self->TicketObj->_NewTransaction( -                         Type     => 'Set', +                         Type     => 'Status',                           Field    => 'Status',                           OldValue => $oldstatus,                           NewValue => 'open', diff --git a/rt/lib/RT/Action/CreateTickets.pm b/rt/lib/RT/Action/CreateTickets.pm index 0ab206771..e1c6f4a9b 100644 --- a/rt/lib/RT/Action/CreateTickets.pm +++ b/rt/lib/RT/Action/CreateTickets.pm @@ -41,7 +41,7 @@ Create one or more tickets according to an externally supplied template.   ===Create-Ticket: codereview   Subject: Code review for {$Tickets{'TOP'}->Subject} - Depended-On-By: {$Tickets{'TOP'}->Id} + Depended-On-By: TOP   Content: Someone has created a ticket. you should review and approve it,   so they can finish their work   ENDOFCONTENT @@ -84,13 +84,13 @@ After each ticket is created, it's stuffed into a hash called %Tickets  so as to be available during the creation of other tickets during the same   ScripAction.  The hash is prepopulated with the ticket which triggered the   ScripAction as $Tickets{'TOP'}; you can also access that ticket using the -shorthand $TOP. +shorthand TOP.  A simple example:   ===Create-Ticket: codereview   Subject: Code review for {$Tickets{'TOP'}->Subject} - Depended-On-By: {$Tickets{'TOP'}->Id} + Depended-On-By: TOP   Content: Someone has created a ticket. you should review and approve it,   so they can finish their work   ENDOFCONTENT @@ -128,8 +128,8 @@ A convoluted example   Queue: Approvals   Type: Approval   AdminCc: {join ("\nAdminCc: ",@admins) } - Depended-On-By: {$Tickets{"TOP"}->Id} - Refers-To: {$Tickets{"TOP"}->Id} + Depended-On-By: TOP + Refers-To: TOP   Subject: Approval for ticket: {$Tickets{"TOP"}->Id} - {$Tickets{"TOP"}->Subject}   Due: {time + 86400}   Content-Type: text/plain @@ -139,7 +139,7 @@ A convoluted example   ENDOFCONTENT   ===Create-Ticket: two   Subject: Manager approval - Depended-On-By: {$Tickets{"TOP"}->Id} + Depended-On-By: TOP   Refers-On: {$Tickets{"approval"}->Id}   Queue: Approvals   Content-Type: text/plain @@ -239,8 +239,8 @@ my $approvals =  Queue: Approvals  Type: Approval  AdminCc: {join ("\nAdminCc: ",@admins) } -Depended-On-By: {$Tickets{"TOP"}->Id} -Refers-To: {$Tickets{"TOP"}->Id} +Depended-On-By: TOP +Refers-To:  TOP   Subject: Approval for ticket: {$Tickets{"TOP"}->Id} - {$Tickets{"TOP"}->Subject}  Due: {time + 86400}  Content-Type: text/plain @@ -431,6 +431,8 @@ sub Commit {  	$args{'requestor'} ||= $self->TicketObj->Requestors->MemberEmailAddresses; +	$args{'type'} ||= 'ticket'; +  	my %ticketargs = ( Queue => $args{'queue'},  		      Subject=> $args{'subject'},  		    Status => 'new', @@ -452,7 +454,7 @@ sub Commit {  	foreach my $key (keys(%args)) { -	    $key =~ /^customfield-(\d+)$/ or next; +	    $key =~ /^customfield(\d+)$/ or next;  	    $ticketargs{ "CustomField-" . $1 } = $args{$key};  	} | 
