How to get a business rules to run only on the first time an incident is set to Resolved state?

Renata C
Giga Contributor

I have a business rules that I need to run only on the first time an incident is set to RESOLVED state, if it goes back to any other state and then it is set to resolved again I don't wan't the business rule to run on it again.
I thought of a few ways but no luck so far, at this point I am doubting my knowledge on BRs, any help is appreciated.

1 ACCEPTED SOLUTION

Yes, that is something I was trying to avoid, but it is the easiest way to do this. Thank you for replying.

View solution in original post

10 REPLIES 10

You do need to create any custom field.

The oob business rule only sets the resolved_at date time if the field is empty, so only the first time it is resolved. You would either need edit that business rule, or add another business rule at a higher order (runs after) that sets the resolved date time every time the state changes to resolved.

 

Regards,

Sachin

SatheeshKumar
Kilo Sage

  this cannot be done, without having a flag/field to store the resoved status.

  create a new field/flag and  set the flag when incident is resolved

  Add conditions in br to check the flag

Yes, I agree with SatheeshKumar

Add a flag to the incident table, which is set to false, when you create an incident record. Set the field to "Read-Only", so that it can only be changed by scripts.

You should use your business rule to trigger when the state of the incident gets set to "Resolved", and then check, if the flag is set to "false". If yes, execute your script and then set the flag to "true".

 

The next time, you will run the business rule, the business rule will fire, but your condition will prevent from running the script again.

 

Regards

Dirk

Yes, that is something I was trying to avoid, but it is the easiest way to do this. Thank you for replying.

Community Alums
Not applicable
Hi Crisley, We are using a custom field 'Reopen Count' which has default value of 0 and only increments if incident is marked Open from Resolved. You can create a custom field similar to this and check if the value is 0. This field will also help your teams to have a count of tickets which were reopened multiple times. Let me know if you have any questions. Kindly mark this comment as helpful/correct answer if it helped you. Cheers, Hardit Singh