Forums

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

Automation to add Service Desk Organization to a ticket

Julia Foden
Contributor
October 13, 2022

Hi 

I would like to use automation to add an Organization to the existing organization (if any) on certain service desk tickets.

I am having problems with the syntax for Organizations in advanced edit.

I have tried 

{
"update": {
"customfield_12900": [
{
"add": {"id": "542"}
}
]
}
}

 and 

{
"update": {
"customfield_12900": [
{
"add": {"name": "Org Name"}
}
]
}
}

but the error is

 (Operation value must be a number (customfield_12900))

Strangely when I try to simply set the field (regardless of any existing values) using

{
"fields": {
"customfield_12900": [
{"id": "542"}

]
}
}

the error is

(The Organization ID must be a number (customfield_12900)) 

So I've tried a couple of things like 

 {"id": "542.asNumber"}

and

{"id": "542.asJsonNumber"}

but no luck. I'm clutching at straws here!

Can anyone advise please!

1 answer

1 accepted

4 votes
Answer accepted
Alex Koxaras -Relational-
Community Champion
October 13, 2022

Hi @Julia Foden 

What do you mean "to add an Organization to the existing organization"? You mean to add an organization to the specific organization field, because it's empty?

Julia Foden
Contributor
October 13, 2022

Hi @Alex Koxaras -Relational- 

I mean add a specific Organization to the field which might be empty or it might already have one other Organization in it. In the latter case I want the end result to be two Organizations in the field.

Thanks

Alex Koxaras -Relational-
Community Champion
October 13, 2022

Try

 "customfield_12900": [542]
Julia Foden
Contributor
October 13, 2022

Hi @Alex Koxaras -Relational- 

Thanks, that works for setting a single organization.

But I'm still stuck on what I really need which is how to add a specific organization to one that may be already there. I need a replacement for 

{
"update": {
"customfield_12900": [
{
"add": {"id": "542"}
}
]
}
}

I really appreciate your willingness to jump in and help! 

Alex Koxaras -Relational-
Community Champion
October 13, 2022

@Julia Foden I got you :)

{
"update": {
"customfield_12900" : [
{
"add": 542
}
]
}
}
Like Tomas Bettanin likes this
Julia Foden
Contributor
October 13, 2022

Brilliant thanks so much @Alex Koxaras -Relational- that works. How funny that the solution was the simplest thing with no "" or {} or anything :) 

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