Hi all,
I've found some matches to my question and tried working through them but was unsuccessful so I'm reaching out for additional help.
What I'm trying to do:
- Jira tickets get created when issues happen in our system and the description of the ticket can contain one or more values for the root cause of the ticket being created. I want to have a multi-select field with all of these potential values available and when this script runs it will do a REGEX match to get all of the values in the ticket and then updated the Jira ticket to put them in the actual Root Cause field (multi-select)
Where I'm stuck:
I'm able to:
- GET all available values for the custom field
- Match and parse out the matched value into a variable
I'm not able to:
- Update the field with a POST request.
What I've tried:
- I have tried solving this by only working with the REST POST request but I'm getting 405 status errors and no response body, I'm clearly missing something.
When I use cURL:
- Command: curl -i -u username:password -X POST -H "Content-Type:application/json Accept:application/json X-Atlassian-Token:nocheck" https://domain/rest/api/2/issue/ITS-9100/editmeta -d '{'update' : {'customfield_13222' : [{'add' : {'value' : 'The_value_in_the_custom_field'}}]}}'
- Result: Access Denied
When I use Insomnia (Postman equivalent):
- Status 405 (no body returned for response)
I'd post the full source but it probably won't be useful because everything appears to work except for the update of the ticket at the end.