Hi everybody,
I am trying to create an automation to assign an Organization to an issue. I am however finding it difficult to get the json in order. Whatever I seem to try, I encounter this error: "Specify the value for Organizations in an array (customfield_10700). I have tried for both "value" and "id".
The json looks a little something like this (please not that customfield_10700 is Organizations):
{ "fields": { "customfield_10700": [ { "value": "Organization1" } ] } }
Thank you for any help!
Hi @Casper Timmermans welcome to the community. With Support's help, I used the API calls to get the Organization of the Reporter:
https://<YourInstance>.atlassian.net/rest/servicedeskapi/servicedesk/{{issue.Request Type.requestType.serviceDeskId}}/organization?accountId={{issue.reporter.accountId}}
And then update the Organization of the Service Request
{
"update": {
"Organizations":
[
{{#webResponse.body.values}}
{"add": {{id}} }
{{^last}},{{/}}{{/}}
]
}
}
If this doesn't help, I'd suggest contacting Support as they did most of the heavy lifting to get this to work. It can even check if there are no Organizations attached to the reporter, or if there are multiple ones, to not default it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.