how to modify "Create Emergency Change" UI action to only be visible on P1/P2 incidents

davematz
Giga Expert

I am working on the ITSM simulator for Madrid version in the Now Learning portal and am having a problem solving this.

I have gone to the "Create Emergency Change" UI action for the Incident (incident) table, but cannot figure out how to get the correct solution.  I have tried a number of different things, but none have been validated in my simulator.

I would appreciate the exact answer that I should have with steps explaining your solution so I can learn from this instead of getting frustrated because I don't understand.  Thank you.

1 ACCEPTED SOLUTION

It should be: && (current.priority == 1 || current.priority == 2)

add that to the original statement. If priority is 1 or 2 this will evaluate to true.

View solution in original post

14 REPLIES 14

ccajohnson
Kilo Sage

Please let us know what you have tried so far so we do not recommend something you may have already tried.

davematz
Giga Expert

I added to UI Action Condition statement:

from: current.incident_state != IncidentState.CLOSED && gs.hasRole("itil") && gs.fieldExists('incident', 'rfc') && current.rfc.nil()

to: current.incident_priority == 1 && current.incident_state != IncidentState.CLOSED && gs.hasRole("itil") && gs.fieldExists('incident', 'rfc') && current.rfc.nil() || current.incident_priority == 2 && current.incident_state != IncidentState.CLOSED && gs.hasRole("itil") && gs.fieldExists('incident', 'rfc') && current.rfc.nil()

 

I tried changing same statement to:

current.incident_priority == 1 - Critical && current.incident_state != IncidentState.CLOSED && gs.hasRole("itil") && gs.fieldExists('incident', 'rfc') && current.rfc.nil() || current.incident_priority == 2 - High && current.incident_state != IncidentState.CLOSED && gs.hasRole("itil") && gs.fieldExists('incident', 'rfc') && current.rfc.nil()

 

I tried changing same statement to:

current.incident_priority == "1 - Critical" && current.incident_state != IncidentState.CLOSED && gs.hasRole("itil") && gs.fieldExists('incident', 'rfc') && current.rfc.nil() || current.incident_priority == "2 - High" && current.incident_state != IncidentState.CLOSED && gs.hasRole("itil") && gs.fieldExists('incident', 'rfc') && current.rfc.nil()

 

I tried to go to the related list for UI Action Visibility, but can't figure out how to use it (if this is what I should be doing because I can't find documentation that explains step by step for me to fix this specific scenario.

Also, my UI action is active.

It should be: && (current.priority == 1 || current.priority == 2)

add that to the original statement. If priority is 1 or 2 this will evaluate to true.