- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 12:36 PM
Hello All,
I need that the Incident can be Proposed to Major Incident and promote to Major Incident only if the incident is prio 1 or prio 2. Can you please help me how to achieve this?
Our developer instance is on release Utah. The plugin Incident Management - Major Incident Management is installed. When I create "Major Incident trigger rule" I set is as active with condition: Priority is 1 - Critical or Priority is 2 - High
But it is not working and still the incidents prio 3-4-5 can be proposed to major incident as well, which is not desired.
Can you please help me where and what I should implement in order to solve it?
Thank you all in advance
Solved! Go to Solution.
- Labels:
-
Major Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2024 06:55 AM
Update...
Hello guys,
so actually I managed to solved it and I will share the working solution here.
I was investigating 2 UI Actions "Propose Major Incident" & "Promote Major Incident", but my solution was not working there.
What you have to do:
- Go to All > Script Include
- Find "MajorIncidentTriggerRules"(this one you will edit and add code here) & "MajorIncidentTriggerRulesSNC"(this one you will only read)
- From MajorIncidentTriggerRulesSNC - find and copy 2 functions called "canProposeMIC" & "canPromoteMIC"
- In MajorIncidentTriggerRules paste those 2 copied function from step n. 3
- In MajorIncidentTriggerRules add this code into both functions:
// check if incident is not prio 1 or prio 2
if (current.priority != 1 && current.priority != 2) {
// Hide the UI Action
return false;
}
Than the result is as follows:
Incidents Priority: 1, 2
- can / UI Action is visible: Propose Major Incident
- can / UI Action is visible: Promote Major Incident
Incidents Priority: 3, 4, 5
- can NOT / UI Action is hidden: Propose Major Incident
- can NOT / UI Action is hidden: Promote Major Incident
I will put the whole file MajorIncidentTriggerRules as reference in the attachment.
Enjoy the working solution! 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 07:09 PM
Hello @LuboHan,
For similar kind of requirement, please refer to the link below:
https://www.servicenow.com/community/itsm-forum/how-can-we-propose-all-p1-incidents-as-major-inciden...
If it is helpful, please mark it as helpful and accept the correct solution.
Thanks & Regards,
Abbas Shaik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 10:15 PM
Hi @LuboHan
Create a client script that runs when the form loads. In the client script, check the value of the priority field. If the Priority is not 1 - Critical or Priority is not 2 - High, disable the propose and promote button using JavaScript.
Please mark this as helpful or accepted if this solves your query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2024 06:47 AM
Hello guys, so actually managed to solved it and I will share the working solution here.
I was investigating 2 UI Actions "Propose Major Incident" & "Promote Major Incident", but my solution was not working there.
What you have to do:
- Go to All > Script Include
- Find "MajorIncidentTriggerRules"(this one you will edit and add code here) & "MajorIncidentTriggerRulesSNC"(this one you will only read)
- From MajorIncidentTriggerRulesSNC - find and copy 2 functions called "canPromoteMIC" & "canPromoteMIC"
- In MajorIncidentTriggerRules paste those 2 copied function from step n. 3
- In MajorIncidentTriggerRules add this code into both functions:
// check if incident is not prio 1 or prio 2
if (current.priority != 1 && current.priority != 2) {
// Hide the UI Action
return false;
}
Than the result is as follows:
Incidents Priority: 1, 2
- can / UI Action is visible: Propose Major Incident
- can / UI Action is visible: Promote Major Incident
Incidents Priority: 3, 4, 5
- can NOT / UI Action is hidden: Propose Major Incident
- can NOT / UI Action is hidden: Promote Major Incident
I will put the whole file MajorIncidentTriggerRules as reference in the attachment.
Enjoy the working solution 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2024 06:55 AM
Update...
Hello guys,
so actually I managed to solved it and I will share the working solution here.
I was investigating 2 UI Actions "Propose Major Incident" & "Promote Major Incident", but my solution was not working there.
What you have to do:
- Go to All > Script Include
- Find "MajorIncidentTriggerRules"(this one you will edit and add code here) & "MajorIncidentTriggerRulesSNC"(this one you will only read)
- From MajorIncidentTriggerRulesSNC - find and copy 2 functions called "canProposeMIC" & "canPromoteMIC"
- In MajorIncidentTriggerRules paste those 2 copied function from step n. 3
- In MajorIncidentTriggerRules add this code into both functions:
// check if incident is not prio 1 or prio 2
if (current.priority != 1 && current.priority != 2) {
// Hide the UI Action
return false;
}
Than the result is as follows:
Incidents Priority: 1, 2
- can / UI Action is visible: Propose Major Incident
- can / UI Action is visible: Promote Major Incident
Incidents Priority: 3, 4, 5
- can NOT / UI Action is hidden: Propose Major Incident
- can NOT / UI Action is hidden: Promote Major Incident
I will put the whole file MajorIncidentTriggerRules as reference in the attachment.
Enjoy the working solution! 🙂