Changing states from a scrip

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?

I’m running RT 3.4.4 w/ ActivePerl 5.8 on a RHEL3 box.

Thanks for your help!

-eric

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

I found the cause of this, I think. The play tickets I was using somehow
got their “requestors” to be nulled out. No requestor, no e-mail
attempt, and I believe that’s why the scrip didn’t fire.

Seems to work as advertised, thanks for you consideration!

-Eric

Eric Horne wrote: