[rt-users] Cancel "Resolve" transaction based on custom fields

Landon Stewart lstewart at iweb.com
Thu Jan 29 18:05:07 EST 2015


On Jan 28, 2015, at 5:27 AM, Jasper Olbrich <jasper.olbrich at students.uni-marburg.de> wrote:
> 
> 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 at iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150129/1a1f5638/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150129/1a1f5638/attachment.pgp>


More information about the rt-users mailing list