Cancel "Resolve" transaction based on custom fields

Hello,

I want to cancel or undo the “Mark as Resolved” transaction based on the
content of custom fields. Currently I’m using a Scrip and I’m only able
to do the following:

  • access the custom fields
  • make the decision
  • comment on the ticket with the reason why it can’t be resolved
  • reopen the ticket

From the ticket’s history, I can tell that it is resolved first, then
my scrip adds the comment and reopens it. But yellow “Results” box shows
only “Status changed from open to resolved”.

Is it possible to suppress the status change from open to resolved with
a scrip or to include the scrip-induced status change in the result box?

Regards,
Jasper Olbrich

Is it possible to suppress the status change from open to resolved
with a scrip or to include the scrip-induced status change in the
result box?

Unfortunately, neither of these is possible in stock RT. Scrips can
only run after a chance has happened, and thus have no chance of
preventing it. They also cannot currently push their results to the
user.

  • Alex

Is it possible to suppress the status change from open to resolved
with a scrip or to include the scrip-induced status change in the
result box?

Unfortunately, neither of these is possible in stock RT. Scrips can
only run after a chance has happened, and thus have no chance of
preventing it. They also cannot currently push their results to the
user.

If you merely need “has a value” rather than “has a specific value”
you may want

Regardless, you may be able to use its code to write your preferred
solution that cancels the Resolve.

-kevin

Hello,

I want to cancel or undo the “Mark as Resolved” transaction based on the content of custom fields. Currently I’m using a Scrip and I’m only able to do the following:

  • access the custom fields
  • make the decision
  • comment on the ticket with the reason why it can’t be resolved
  • reopen the ticket

From the ticket’s history, I can tell that it is resolved first, then my scrip adds the comment and reopens it. But yellow “Results” box shows only “Status changed from open to resolved”.

Is it possible to suppress the status change from open to resolved with a scrip or to include the scrip-induced status change in the result box?

I hope I’m understanding this correctly…

I would use a Scrip with a condition of “On Resolve” and have the scrip evaluate the ticket to see if it should be reopened. If it should be reopened the action portion of the scrip would open the ticket via $self->TicketObj->Status(“open”) again.

Name of Scrip:
“On Resolve Reopen if CustomFieldName Contains Some Text”

Condition: Select “On Resolve”

In the preparation section of the Scrip:
return 0 unless $self->TicketObj->FirstCustomFieldValue(“CustomFieldName”) =~ /Some Text/;
return 1;

In the action (commit) section of the Scrip:
$self->TicketObj->Status(“open”);
$self->TicketObj->Comment( Content => "Script re-opened because CustomFieldName is ".$self->TicketObj->FirstCustomFieldValue(“CustomFieldName”) );

Maybe?

Landon Stewart : lstewart@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932

signature.asc (203 Bytes)

In the action (commit) section of the Scrip:
$self->TicketObj->Status(“open”);
$self->TicketObj->Comment( Content => "Script re-opened because CustomFieldName is ".$self->TicketObj->FirstCustomFieldValue(“CustomFieldName”) );

Oops. Should read “Ticket re-opened because…”

And it should be followed by:

return 1;

Landon Stewart : lstewart@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932

signature.asc (203 Bytes)

Is it possible to suppress the status change from open to resolved
with a scrip or to include the scrip-induced status change in the
result box?

Unfortunately, neither of these is possible in stock RT. Scrips can
only run after a chance has happened, and thus have no chance of
preventing it. They also cannot currently push their results to the
user.

If you merely need “has a value” rather than “has a specific value”
you may want
RT-Extension-MandatoryOnTransition-0.23 - RT-Extension-MandatoryOnTransition Extension - metacpan.org

I need “has a value iff another CF has a special value”. Thanks for the
hint, I’ll have a look at this extension.

Jasper Olbrich