ReOpen ticket condition in business rule

Shivani29
Mega Guru

Hi All,

I I created a custom table Service Request (u_service_request) and need to clear some fields value when user reopens it the ticket. I am writing a business rule and need a help to write condition where I can check if the ticket is reopened. I checked the business rule created for incident table and the condition mentioned is : new Incident(current).hasReopened();

But I am unable to modify it as per my requirement. 

 

Thanks in Advance

Shivani

1 ACCEPTED SOLUTION

Prince Arora
Tera Sage
Tera Sage

@Shivani29 

 

Instead of modifying existing Business rule

Please create your own separate business rule, before - update, there is a field on incident table "reopen_count", you can add a condition on that

 

When to run -> "incident_count" changes and you can update/clear the fields in the advance section of business rule

 

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.

View solution in original post

5 REPLIES 5

Prince Arora
Tera Sage
Tera Sage

@Shivani29 

 

Instead of modifying existing Business rule

Please create your own separate business rule, before - update, there is a field on incident table "reopen_count", you can add a condition on that

 

When to run -> "incident_count" changes and you can update/clear the fields in the advance section of business rule

 

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.

Hi Prince,

I checked in the system for reopen count script which is available for incident and trying to copy that to create new one for custom table Service Request. But I am facing an issue. There is a condition: current.isValidField('reopen_count') && new Incident(current).hasReopened()

Do I need to replace Incident(current) with my custom table Name or backend name. Like it should be new service request(current) or new u_service_request(current). Can you please help me in this.

 

Thanks in advance,

Shivani

@Shivani29 

 

Ohh you want to perform the operation on custom table "u_service_request"

 

How you are reopening the ticket for new table?

Is it a Ui action? If So you can write the code behind that UI action only

Shivani29
Mega Guru

Thanks Prince. 

Yes I am creating new BR. That condition was for reference which can be used in my BR after modification.

Lemme try the approach you suggested and will update you shortly.

 

Regards,

Shivani