[rt-users] Moving a ticket on deletion
Stephen Turner
sturner at MIT.EDU
Fri Jul 15 16:08:54 EDT 2005
At Friday 7/15/2005 03:27 PM, Viren Patel wrote:
>Hello. I am using RT 3.2.3. I would like to create a scrip
>to move a ticket from one queue to another when the
>ticket is deleted. So I created a custom scrip for the
>originating queue as follows:
> Custom condition:
> if ( $self->TicketObj->Status eq 'Deleted' ) {
> return 1;
> } else {
> return 0;
> }
Note that this condition will be true for any action taken on a deleted
ticket - maybe not a big deal because deleted tickets typically don't have
anything done to them, but it might be safer to check the transaction to
emulate the "On Delete" condition. (look for trans type = 'Status',
NewValue = 'deleted' and OldValue != deleted').
> ($status, $msg) = $self->TicketObj->SetStatus( 'new' );
So you've now got two status changes going on - maybe not a problem, but I
wonder if this is confusing RT?
>While the ticket disappears from the originating queue, it
>doesn't show up in the 'Deleted' queue. I have tried
>interchanging the preparation code with the cleanup code
>(I guess I don't understand the difference) but same
>problem. Any pointers to what I am doing wrong? TIA.
Do you know what queue it does end up in? What status it gets? You should
be able to find the ticket in the database and check it's Queue & Status
values. If you pull up the ticket in the web UI, does the history indicate
what happened?
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20050715/31246af9/attachment.htm>
More information about the rt-users
mailing list