Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can I copy a cascading select value with Automation for JIRA?

andreas Community Leader May 09, 2017

I'd like to copy a cascading select from one issue to another. This requires the Advanced section in edit issue, but not sure what to put into it?

3 answers

1 accepted

11 votes
Answer accepted
andreas Community Leader May 09, 2017

Lets assume our field is called "Sample Cascade" here.  The advanced JSON block you'll need to copy this in your edit issue action is:

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

Here's an example rule that copies from the parent issue to all of its subtasks:

copy-cascading-select.png

Hi
Can you please add this solution to documentation?

https://docs.automationforjira.com/

How can I explicitly set a value for a subtask I am creating, rather than copy it?

Hey, just for anyone else. 

 

You can simply paste in the string value of the entry into the section where the trigger is ran. You would replace {{triggerIssue.fields.....}} with "Your Value".

Like Liam Green likes this
Liam Green Community Leader Oct 22, 2020

@andreas @Jordon Ellis 

I've been trying for an hour to do this!

Thank you!!

@andreas 

Is it possible to inherit only the first value of a cascading field? In the target configuration, there will be a cascading field on Epic level and on Story level and the 1st field will have the same values, but not in the second field

@andreas thank you so much!!!!

And if I would like to copy more than 1 field?

hi @andreas thanks for the example!

I was trying to do something similar but if I execute this, it does not work.

{
"fields": {
"customfield_10043": "{{triggerIssue.customfield_10043.value}}",
"customfield_10043.child": "{{triggerIssue.customfield_10043.child.value}}"
}
}

It throws this error...

Error creating issueCan 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_10043)Unknown fields set during create, they may be unavailable for the project/type. Check your custom field configuration. Fields ignored - customfield_10043.child

However if use your code it works just fine, I was just trying to simplify it.

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

Is there a reason why the first one won't work or am I missing something?

 

You are missing something, try this

{
 "fields": {
    "customfield_10043": {
        "value": "{{triggerIssue.fields.customfield_10043.value}}",
            "child": { "value" : "{{triggerIssue.fields.customfield_10043.child.value}}"
             } 
     }
 }
}

Like # people like this

Hi @andreas 

Is it possible to inherit only the first value of a cascading field? In the target configuration, there will be a cascading field on Epic level and on Story level and the 1st field will have the same values, but not in the second field

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

341 views 2 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you