2 answers
- 210
Hi!
There is no such method nodeHelper.getImpact, you can do:
incident.impact =impactName
Add your comment... - 10-1
Hi, we managed to make it work.
We're working with Jira cloud, and we found two custom fields there, Urgency and Impact. We added these to the screen of the project we wanted to sync (check if it's there already, it may be depending on the Jira flavour you are using for your project).
Since Exalate has deprecated setting the priority directly, we need to set these two values to get an ITIL conform prio.
Please note, that these Jira fields use a 4 value choice instead of the expected 3 value choice, so you must compromise and do the matching yourself (you can replace entity with incident in the script if you have to).
Our Jira works as a master instance, we don't change these values in SN, so you will have to write these scripts yourself based on the ones I'm providing here, if you need a two-directional sync of these field values.
SN incoming// Urgency sync def urgencyMapping = [ // Jira issue urgency <-> Snow incident urgency "High":"1 - High", "Critical":"1 - High", "Medium":"2 - Medium", "Low":"3 - Low" ] def defaultUrgency = "3 - Low" def urgencyName = urgencyMapping[replica.urgency.value] ?: defaultUrgency // set default urgency in case the proper urgency could not be found entity.urgencyValue = urgencyName // Impact sync def impactMapping = [ // Jira issue impact <-> SNOW incident impact "1 - Critical":"1 - High", "2 - High":"1 - High", "3 - Medium":"2 - Medium", "4 - Low":"3 - Low" ] def defaultImpact = "3 - Low" def impactName = impactMapping[replica.impact.value] ?: defaultImpact // set default impact in case the proper impact could not be found entity.impact = impactName
Jira cloud outgoingreplica.urgency = issue.Urgency replica.impact = issue.Impact
Please share your script if you find these useful.
BR, L
Add your comment...
Hello.
New script is created in Jira and sent to SN.
Incoming sync in SN for impact field looked as below but it didn't work:
So I did mapping for this field, so now it looks:
But now is a sync error:
@Andrew you can check the script I've shared, it may work for you too.