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,455,421
Community Members
 
Community Events
175
Community Groups

Is it possible to update both values of a Cascading field based on text in an issues Description?

I am wondering if there is a way to create an automation in Jira that updates both values of a cascading field based on text in the Description. Long story short, I have created a Slack form that generates a Jira issue, but due to certain requirements, it is a manual form so every answer to a question goes into the "Description" field.

I would like to reference a part of said text in the description field in the automation so that it then updates the corresponding Cascading, custom field.

I've gotten halfway there but my JSON gives me the "Error while parsing additional fields. Not valid JSON."

So heres how I want it to work ideally:

  • When an Issue is Created (Trigger);
  • If the description field contains the words "Fake Text" (If Block);
  • My automation should then Edit (Edit Issue);
  • And consequently update both values of my cascading field.
  • "Fake Text" will control both values for the field.

 

Below is the JSON I have tried thus far:

1.

"fields": {
"customfield_12345" : { "value": "fake_text1", "child": { "value" : "fake_text2"} }
}
}

 

2.

{
  "set": {
    "customfield_12345": [
      {
        "set": {
          "value": "{{triggerIssue.fields.Sample Cascade.fake_text1}}",
          "child": {
            "value": "{{triggerIssue.fields.Sample Cascade.child.fake_text2}}"
          }
        }

 

I think my biggest hangup is not knowing where/how to reference the custom field ID (Another cascading field exists by the same name) and also not understanding if the "Fake Text" should have a space between words, or an underscore in the JSON.

Any help is greatly appreciated! Thank you!

2 answers

1 accepted

0 votes
Answer accepted

Hi again! Figured out what went wrong here. Just sharing in case it helps someone else

1. I checked the actual custom field value configuration and found that the option I was testing had an extra space at the end. I deleted it and the below code worked flawlessly afterwards.

2. Another notes is that I thought I had to use underscores instead of spaces in the value names but the spaces worked just fine. 

Successful JSON below

{
"fields": {
"customfield_12345": {"value": "First Value Name Here", "child": {"value": "Second Value Name Here"}}
}}
} 

Thank you @YogeshKR for your help as well!

Hi @SheLa Newburn ,

Below JSON worked fine for me!
I copied a value from triggered issue. 

 

{
"update": {
"customfield_12345": [
{
"set": {
"value": "{{triggerIssue.fields.customfield_12345.value}}",
"child": {
"value": "{{triggerIssue.fields.customfield_12345.child.value}}"
}
}
}
]
}
}

Hope this helps!!

Regards,
Yogesh

Thank you @YogeshKR

I tried it and interestingly enough, it no longer gives me and error but it still doesn't update the values in the field. I can see in the automations audit log that the rule even runs successfully, but nothing changes in the actual issue. Any thoughts as to why that may be?

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events