How to set 'priority' field on new incident when using REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2015 04:07 PM
We are trying to create an incident using the REST table API. When creating a new incident, we are always getting the priority field returned as blank...an empty string. When we bring up the incident in the UI, the priority is shown as '1 - Critical' which is not what we want. I have played around with passing various values (using '1' for impact, the integer value 1, '1 - High') to the API but nothing seems to work.
I have tried all combinations of the 'sysparm_input_display_value' and 'sysparm_display_value' querystring values with no results. We always get the same result, which is the ticket gets created as intended, but the 'priority' field always comes back as an empty string.
We have read in the docs, and observed in the UI, that the priority should be set based on the values provided in the 'impact' and 'urgency' field, but that does not appear to be happening.
Any advice?
Thanks,
William
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2015 05:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 11:38 AM
Hey Robert,
I work for William, there is no business rule set as when we change the impact and urgency manually , the priority changes. It does not change only through the api
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 02:45 PM
I am pretty sure that business rules should still run. You could try making a new 'after' business rule to run on incident to re/set the priority, if I interpret what your saying, then it appears that a run onchange rule is running when you change the record and save that set the priority correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 03:18 PM
Is your REST call changing your impact and urgency fields? If it is just remove impact and urgency from your REST call and let the default values take over.