Show 'Close Incident' button when incident is in status new and a specific assignment group selected

JohnDF
Mega Sage

Hi everyone,

 

is it possible to close a incident over the close incident button when the incident is in status new and the assigned group is 'service desk'?

 

How would I achieve this?

 

Thank for your help.

3 REPLIES 3

Murthy Ch
Giga Sage

Hi @JohnDF 

In the condition field in UI Action record you can add condition like below:

current.state=="1"&& current.assignment_group="Service desk group sys_id"

Hope it helps.

 

Thanks,
Murthy

Hi @Murthy Ch  thanks for reply,

 

the problem is here, when I click on the button the state is changed to close and I need to enter resoultion notes and Resolution code and I have to enter it and have to click a second time. How can I avoid this behavior? I want to close instant the Incident without update this both fields.

Don't change this behavior, Instead write code like below in Script section of UI action.

MusabRasheed_0-1665139266809.png

Code:

current.close_code = 'Solved (Permanently)';
current.close_notes = 'Closing the incident';
current.update();
Please hit like and mark my response as correct if that helps
Regards,
Musab