[rt-users] Changing states from a scrip
Andreas Putzo
putzoa at gmx.de
Thu Dec 1 16:53:41 EST 2005
On Thursday 01 December 2005 20:26, Eric Horne wrote:
> I have a script that changes the state of a ticket based on the contents
> of the transaction. For example, if someone responds with "Resolved" as
> the first line in the body of an e-mail, I'd like the ticket to resolve
> itself.
>
> I have something working using self->TicketObj->SetStatus("resolved").
> The ticket does go into the resolved state as desired. However, it does
> not appear to cause the "Notify requestor on Resolve" global scrip. So
> while the ticket is resolved, the requestor does not get any e-mail. Of
> course, the global "On Resolve notify requestor" works fine on queues
> without my SetStatus scrip.
>
> How can I change the state of a ticket and fire the "On Resolve notify
> requestor" scrip?
Take a look into the Scrips in the ___Approval Queue. They do:
# Now magically turn myself into a Requestor Notify object...
require RT::Action::Notify; bless($self, 'RT::Action::Notify');
$self->{Argument} = 'Requestor'; $self->Prepare;
Don't know, if there is a smarter way. Also, this might cause
other problems. If i remember correctly, the sent out emails will not
occur in the history for example.
regards, Andreas
More information about the rt-users
mailing list