/build/static/layout/Breadcrumb_cap_w.png

Testing for Ticket Status Before & After Update

Hi -

I believe I have seen the solution before, but forget where....

We have a OTS rule that sends out a 'ticket closed' email when the ticket has a closed status. Problem is, we are doing some maintenance on the tickets after close and emails keep going out to the submitter.

I assume there is a way to have the SQL only find the ticket if it's prior status was not closed and its new state is closed?

Thanks again,
- Allen

0 Comments   [ + ] Show comments

Answers (1)

Posted by: GillySpy 13 years ago
7th Degree Black Belt
0
Are emails going out to the submitter because you are changing something that would be triggered by the "email on events" options yuo have on? Or because of a rule?

If it's because of "email on events" then your only option is to turn off those options and instead rewrite all those events as rules. You will have more control this way but it may take some work to re-implement them all as rules.

If it's by rule then you can do the modification you want. Something like:
select blah
from
HD_TICKET
JOIN HD_TICKET_CHANGE C on HD_TICKET_ID=HD_TICKET.ID and C.ID=<CHANGE_ID>
JOIN H_TICKET_CHANGE_FIELD F ON HD_TICKET_CHANGE_ID=C.ID and F.FIELD_CHANGED='HD_STATUS_ID'
JOIN HD_STATUS S_OLD ON S_OLD.ID=F.BEFORE_VALUE and S_OLD.STATE<>'Closed'
JOIN blah
WHERE blah
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ