[rt-users] how to add ability to escalate to another queue

slamp slamp slackamp at gmail.com
Tue Jun 24 11:31:46 EDT 2008


I have put together the following using resources already on the web.
Can anyone help fix the code? Basically I want to change the queue
when a user changes the CF value to Yes and while doing that add the
user as a Cc and set the owner to Nobody. So the change queue code
works, but then the user no longer has permission to view/reply to the
ticket.

Conditon: User Defined
Action: User Defined
Template: blank
State TransactionCreate


Custom condition:
return 1 unless ($self->TicketObj->FirstCustomFieldValue('Escalate') =~ /Yes/i);

Custom action prep code:
#Change ticket's queue with target queue name
my $TargetQueueName = 'MyQueue';
my $TicketObj = $self->TicketObj;
my $Actor = $self->TransactionObj->CreatorObj->Id;
my ($status, $msg) = $TicketObj->SetQueue( $TargetQueueName );
unless( $status ) {
  die "Error: $msg";
}
my ($status, $msg) = $self->TicketObj->AddWatcher(
     Type => "Cc",
     PrincipalId => $Actor
);

Jun 24 11:24:29 rt RT: Scrip 65 Prepare failed: Error: That is the
same value at (eval 10120) line 7.  Stack:   [(eval 10120):7]
[/opt/rt3/lib/RT/ScripAction_Overlay.pm:234]
[/opt/rt3/lib/RT/Scrip_Overlay.pm:478]
[/opt/rt3/lib/RT/Scrips_Overlay.pm:239]
[/opt/rt3/lib/RT/Transaction_Overlay.pm:173]
[/opt/rt3/lib/RT/Record.pm:1466]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:3554]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:2024]   [(eval 10101):5]
[/opt/rt3/lib/RT/ScripAction_Overlay.pm:234]
[/opt/rt3/lib/RT/Scrip_Overlay.pm:478]
[/opt/rt3/lib/RT/Scrips_Overlay.pm:239]
[/opt/rt3/lib/RT/Transaction_Overlay.pm:173]
[/opt/rt3/lib/RT/Record.pm:1466]   [/opt/rt3/lib/RT/Record.pm:1696]
[/opt/rt3/lib/RT/Record.pm:1599]
[/opt/rt3/lib/RT/Interface/Web.pm:1342]
[/opt/rt3/lib/RT/Interface/Web.pm:1249]
[/opt/rt3/share/html/Ticket/Modify.html:73]
[/opt/rt3/share/html/autohandler:291]
(/opt/rt3/lib/RT/Action/UserDefined.pm:67)
Jun 24 11:24:29 rt RT: WebRT: No permission to view ticket ()
(/opt/rt3/share/html/Elements/Error:78)




On Mon, Jun 23, 2008 at 7:06 PM, slamp slamp <slackamp at gmail.com> wrote:
> thanks for the reply Tom, it would be nice if you can contribute your
> implementation once they are implemented.
>
> On Mon, Jun 23, 2008 at 6:59 PM, Tom Lanyon <tom at netspot.com.au> wrote:
>> On 23/06/2008, at 11:20 PM, slamp slamp wrote:
>>
>>> Has anyone done this? We have this requirement in our workflow.
>>
>>
>> I'm just about to implement this on our dev environment.
>>
>> We are planning on adding a button marked 'Escalate' which will create a
>> *new* ticket in the next Queue and add it as a dependency of the original
>> ticket. There has been endless debate internally over whether the ticket
>> should be moved or a new linked ticket created.
>>
>



More information about the RT-Users mailing list