On Jan 28, 2015, at 5:27 AM, Jasper Olbrich <jasper.olbr...@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 : lstew...@iweb.com Lead Specialist, Abuse and Security Management Spécialiste principal, gestion des abus et sécurité http://iweb.com : +1 (888) 909-4932
Description: Message signed with OpenPGP using GPGMail