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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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
Answered 03/04/2011 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity