Incident Assigned To Mandatory

RobertPC
Tera Contributor

I have created a UI policy that sets Assigned To as mandatory when an Incident ticket is greater than new. The problem, is that if we need to change the assignment group, the assigned to stays mandatory. The user need to be able to re-assign to a new assignment group without changing the state to New. Is there some type of script that I can use to do this.

3 REPLIES 3

Community Alums
Not applicable

Try adding ["Assignment Group" is Not Empty] condition to your existing UI Policy.

jonsan09
Giga Sage
Giga Sage

Best practice should be that when an incident is reassigned it state should be set back to New, your existing UI policy should work in that case

AndersBGS
Tera Patron
Tera Patron

Hi @RobertPC ,

 

To achieve this in ServiceNow, you can use Business Rules and Client Scripts. Here's a step-by-step guide on how to set the "Assigned To" field as mandatory when an Incident ticket is created, but not mandatory when the incident is reassigned to a new assignment group:

1. Create a Business Rule:

First, you need to create a Business Rule that runs when an Incident ticket is created. This Business Rule will make the "Assigned To" field mandatory initially.

  1. Navigate to "System Definition" > "Business Rules" in the left navigation pane.

  2. Click on "New" to create a new Business Rule.

  3. Configure the Business Rule as follows:

    • Table: Incident [incident]
    • Advanced: No conditions (it should apply to all new incidents)
  4. In the "Advanced" tab, add a script that sets the "Assigned To" field as mandatory.

if (current.operation() == 'insert') {
    gs.addInfoMessage("Please assign this incident to a user.");
    current.assignment_group.setMandatory(true);
}

Save the Business Rule.

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/