Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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 Champion
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
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events