Validation script for impact and urgency field when 'promote to major incident' ui button is clicked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 10:31 PM
Hi
I have a requirement when ' promote to major incident' button is clicked, a message should pop up to indicate the user to adjust the priority field to be critical or high when the priority is not in critical or high, so users are mandated to re-enter/populate the values again for 'impact' and 'urgency' fields.
I have created an onSubmit client script and modified the 'promote to major incident' ui script to the following but somehow when incident is successfully promoted, the 'major incident state' sticks to 'proposed' instead of 'accepted' . Can someone please point out why is my client script overwriting the major incident trigger rules?
onSubmit client script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 03:36 AM
Hi, I am not sure what you are trying to do here but there's an error in your script, below condition will never be evaluated to true bz priority can either be 1 or 2 but can't be both at same time. Or maybe you want to use an Or (||) operator instead.