- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 08:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 10:54 AM - edited 02-14-2023 12:13 PM
@FaizDev101 try this
if(producer.priority == '1 - Critical'){//priority variable choices 1 - Critical "value"
current.impact =1;
current.urgency = 1;
}else if(producer.priority == '2 - High'){/priority variable choices 2 - High "value"
current.impact = 1;
current.urgency = 2;
}else if(producer.priority == '3 - Moderate'){/priority variable choices 3 - Moderate "value"
current.impact = 2;
current.urgency = 2;
}else if(producer.priority == '4 - Low'){/priority variable choices 4 - Low "value"
current.impact = 2;
current.urgency = 3;
}else if(producer.priority == '5 - Planning'){/priority variable choices 5 - Planning "value"
current.impact = 3;
current.urgency = 3;
}
check one thing in priority variable choices "value" should be given above in "if" and "else if"
Bharath Chintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 09:47 PM
I used this code and it is working Thank you so much.
if(producer.priority == 1){
current.impact = 1;
current.urgency = 1;
}else if(producer.priority == 2){
current.impact = 1;
current.urgency = 2;
}else if(producer.priority == 3){
current.impact = 1;
current.urgency = 3;
}else if(producer.priority == 2){
current.impact = 2;
current.urgency = 1;
}else if(producer.priority == 3){
current.impact = 2;
current.urgency = 2;
}else if(producer.priority == 4){
current.impact = 2;
current.urgency = 3;
}else if(producer.priority == 3){
current.impact = 3;
current.urgency = 1;
}else if(producer.priority == 4){
current.impact = 3;
current.urgency = 2;
}else if(producer.priority == 5){
current.impact = 3;
current.urgency = 3;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 10:02 PM
@FaizDev101 you don't need to each number that many times each priority number once is enough
Replace this
if(producer.priority == 1){
current.impact = 1;
current.urgency = 1;
}else if(producer.priority == 2){
current.impact = 1;
current.urgency = 2;
}else if(producer.priority == 3){
current.impact = 2;
current.urgency = 2;
}else if(producer.priority == 4){
current.impact = 2;
current.urgency = 3;
}else if(producer.priority == 5){
current.impact = 3;
current.urgency = 3;
}
Bharath Chintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 08:43 AM
@FaizDev101 I hope you know Priority will be set based on urgency and impact. If you want to update priority direct open priority variable in record producer and select map to field select priority in drop down.
This will map priority to incident table from record producer.
Bharath Chintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 09:02 AM
I tried map to field option but it's not changing, the priority remains default in incident table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 09:37 AM
then as I said based on impact and urgency only you can set it
write this in record producer script and remove map to field
if(producer.priority == '1 - Critical'){
current.impact = '1 - high';
current.urgency = '1 - high';
}else if(producer.priority == '2 - High'){
current.impact = '1 - high';
current.urgency = '2 - medium';
}
As follows per the screen shot look up rule complete else if conditions for all 5 priorities.
Bharath Chintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 10:20 AM
added the script, removed map to field as you said still didn't changed. Please help