Forums

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

Automation doesn't work with JSON

Niels Dinglinger September 15, 2023

Hi,

I create an Automation to fill the Assignee to a custom filed after change the Status.

The Audit said, all is ok and it is sucess but in the issue the field assignee doesn't filled.

This is my Jason.

{
"fields": { "assignee": {{ issue.customfield_10068.name.asJsonObject("name")}}
}

}

it works with the onPremise Version but not with the Cloud Version.

any ideas what is wrong?

Kind Regards

Niels

1 answer

1 accepted

4 votes
Answer accepted
Hana Kučerová
Community Champion
September 15, 2023

Hi @Niels Dinglinger ,

I think accountId should be used instead of name, so please try 

issue.customfield_10068.accountId

Which type has your custom field? Probably there’s no need for JSON.

Also do you want to copy assignee to custom field or custom field to assignee?

Thank you.

Niels Dinglinger September 15, 2023

Hello @Hana Kučerová 

Thank you for your Answer

i tried this code and it works

"fields": { "assignee": {{ issue.customfield_10068.accountId.asJsonObject("accountId")}}

Thank you

Like Jeroen Poismans likes this

Suggest an answer

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

Atlassian Community Events