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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,579
Community Members
 
Community Events
184
Community Groups

Automation is not recognizing a JSON value because the value includes a slash or a dash

I am setting up automation to create subtasks on tickets created from our service desk. I have to set a required cascading list field. All of my JSON is working except for the following: 

{
"fields": {
"access_type": { "value": "Google Workspace / GSuite (manual approval rqd)" }
}
}

 

{
"fields": {
"access_type": { "value": "iLMS - Inspired eLearning (manager approval)" }
}
}

 

For comparison this one does work: 

{
"fields": {
"access_type": { "value": "Active Directory (manual approval rqd)" }
}
}

 

I suspect it's related to the "-" and "/" in the ones that aren't working. I am new to JSON and I couldn't find anything to indicate I needed to escape out of those characters but maybe I'm wrong. I'm not sure where else to look. any help is appreciated!

2 answers

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 02, 2023

Hi @Lexi Huefner 

Have you tried using the parent and child syntax for the cascading field, as described here: 

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Cascading-select-custom-field

Kind regards,
Bill

I did not try using "id" but I have used "value". That's what you see above. Do I need to include child? There is no child necessary for the parent field so I excluded that part. It worked on all of the other ones I created. Only these 2 aren't working. 

I'll try id and let you know. Thanks!

Like Bill Sheboy likes this

Do you know how I find the id for the option I need? I can only find articles on how to find the custom field id.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 03, 2023

I recall seeing an experimental REST API to get the options, but I cannot find it.

One way I know works is to set the option you want in an issue, and then call the REST API to get the possible smart values, search for your field, and you will find the option id, as described in this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Basically you call the function with a browser for your issue like this, and then find the option id:

yourJiraUrl/rest/api/2/issue/yourIssueKey?expand=names

That worked! Thanks so much!

Like Bill Sheboy likes this

This is the error I see.Screenshot 2023-05-02 at 3.32.00 PM.png

Suggest an answer

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

Atlassian Community Events