Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to create automation for a custom field with parent - child value

"customfield_10055": {
                    "self": "https://xxxxx.atlassian.net/rest/api/2/customFieldOption/10177",
                    "value": "_Interní",
                    "id": "10177",
                    "child": {
                        "self": "https://xxxxx.atlassian.net/rest/api/2/customFieldOption/10192",
                    "value": "NG",
                        "id": "10192"
                   }                
}

Hi, I have trouble creating automation for custom field when the value is parent-child object.
But the child is optional.

{
"fields": {
"customfield_10055": "{{triggerIssue.fields.customfield_10055.asJsonObject("id")}}"
}
}

I also tried many other possibilites.

And this is the error I get:

(Can not instantiate value of type [simple type, class com.atlassian.jira.issue.fields.rest.json.beans.CustomFieldOptionJsonBean] from JSON String; no single-String constructor/factory method (customfield_10055)) 

Thank you

1 answer

1 vote
Joy Chiu
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 19, 2021

Hi @Tomáš Chovanec ,

We don't support cascading select list as part of the simple forms yet (tracked here: AUT-327 ) so you'll need to use advanced fields. https://support.atlassian.com/jira-software-cloud/docs/advanced-field-editing-json/#field-syntax-examples

You'll want to use something like:

{
    "fields": {
        "Your Field": { "value": "{{triggerIssue.Your Field.value}}", "child": { "value" : "{{triggerIssue.Your Field.child.value}}"} }
    }
}

Cheers,

Joy [Automation fro Jira]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events