<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On Jan 28, 2015, at 5:27 AM, Jasper Olbrich <<a href="mailto:jasper.olbrich@students.uni-marburg.de" class="">jasper.olbrich@students.uni-marburg.de</a>> wrote:<div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class="">Hello,<br class=""><br class="">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:<br class=""><br class="">* access the custom fields<br class="">* make the decision<br class="">* comment on the ticket with the reason why it can't be resolved<br class="">* reopen the ticket<br class=""><br class="">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".<br class=""><br class="">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?<br class=""></div></blockquote><div><br class=""></div></div>I hope I'm understanding this correctly...<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">Name of Scrip:</div><div class="">"On Resolve Reopen if CustomFieldName Contains Some Text"</div><div class=""><br class=""></div><div class="">Condition: Select "On Resolve"</div><div class=""><br class=""></div><div class="">In the preparation section of the Scrip:</div><div class=""><font face="Courier New" class="">return 0 unless $self->TicketObj->FirstCustomFieldValue("CustomFieldName") =~ /Some Text/;</font></div><div class=""><font face="Courier New" class="">return 1;</font></div><div class=""><br class=""></div><div class="">In the action (commit) section of the Scrip:</div><div class=""><font face="Courier New" class="">$self->TicketObj->Status("open");</font></div><div class=""><font face="Courier New" class="">$self->TicketObj->Comment( Content => "Script re-opened because CustomFieldName is ".$self->TicketObj->FirstCustomFieldValue("CustomFieldName") );</font></div><div class=""><br class=""></div><div class="">Maybe?</div><div class=""><br class=""></div><div class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Landon Stewart : <a href="mailto:lstewart@iweb.com" class="">lstewart@iweb.com</a></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Lead Specialist, Abuse and Security Management<br class="">Spécialiste principal, gestion des abus et sécurité<br class=""><a href="http://iweb.com" class="">http://iweb.com</a> : +1 (888) 909-4932</div><div class=""><br class=""></div></div></div></div></body></html>