Automation for assigning Organizations

Casper Timmermans
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 30, 2024

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!

1 answer

1 accepted

0 votes
Answer accepted
Dan Breyen
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 30, 2024

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events