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

How to copy cascading parent list value to another list field?

Rompicherla Kalyani
Contributor
July 7, 2023

When I create a 2 dimensional gadget, choosing cascading filed as Y axis,

I am seeing the results with respect to cascading values.

For Example:

field name = Application

Application = Jira - Bugfix, Access, Change, Automation.

                     Datadog - Config, Access, Integration

Chart is displaying each child value separately like:

App Name   count    Percentage

Jira- Bugfix   - 12    -  20% 

Jira - Access - 15   -   25%

DD - Access  - 10   -  17%

But my requirement is to see the chart as

AppName   count     percentage

Jira                 27              45%

DD                 10             17%

Tried following the below for copying the parent value,

Created a new text field called App and created rule as explained in the below link.

Its actually working fine. But later realized, there is a limitation "Text field" can't be used for 2D gardgets, as it won't show the text fields in axis dropdown selection

https://confluence.atlassian.com/automationkb/automation-for-jira-copy-parent-value-of-cascading-field-to-another-custom-field-1035240617.html

For that reason tried the same automation rule for a list field, but this is not working as expected., list is not showing the actual parent value of my cascading field. Instead its displaying 'None' on the Issue View screen.

I know there is a ticket with Jira Team to make text fields visible on charts. Also I am looking for this behavior with in the Jira directly not using any 3rd party apps.

Kindly throw some light, if anyone has experienced this already.

Thanks,

Kalyani.

3 answers

1 accepted

2 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 10, 2023

Hi @Rompicherla Kalyani - Regarding your JSON:

{
"update": {
"Apps": [
{
"set": {
"value": "{{issue.fields.SelectApplication.value}}"
}
}
]
}
}

Can you confirm that what I've bolded are the actual custom field names?  For example, if there's a space in the field name, you need to have that space in the smart value as well.

Also, please confirm your end goal.  Am I correct that you're trying to copy a cascade select parent value to a Select List (Single Choice)?  If so, you should not need to use JSON for this.  You should be able to select your target field from and then use this:

{{issue.fields.YOURCUSTOMFIELD.value}}
Rompicherla Kalyani
Contributor
July 10, 2023

Excellent!!

This worked perfectly fine.

A quick query, how can I get this work, in case of old tickets.

I wanted to update this "App" select list field for all the tickets raised from start of this year.

Basically "App" is a new field I have created now, to copy the parent value of Select Application cascading field.

Thank you very much @Mark Segall 

Like Mark Segall likes this
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 11, 2023

how can I get this work, in case of old tickets.

I would copy the rule and on the copy, change the trigger to Scheduled. Use JQL like this:

CUSTOMFIELD IS EMPTY

This will allow it to run multiple times and continuously pick up the issues that haven't been processed yet.

Ignore the below if you're working with less than 1k issues

 


 

NOTE - If you're dealing with a large number of issues, the rule will need to execute multiple times.  If you're dealing with 3,000+ issues, the rule may even throttle how many times it can run in one day.  You have a couple options:

  1. If you're not in a rush, space the schedule so that you don't throttle each day
  2. Keep running the rule until it throttles, then simply copy the rule and run the new version.  Keep repeating this until you've processed all of the batches it can process
Like Rompicherla Kalyani likes this
Rompicherla Kalyani
Contributor
July 11, 2023

You're a genius!!

This also worked perfectly.

Thanks a Million @Mark Segall 

Like Mark Segall likes this
Rompicherla Kalyani
Contributor
July 13, 2023

@Mark Segall Is there a way to turn off the Issue notifications for this "App" field?

To avoid unnecessary emails for the users.

Thanks.

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 13, 2023

In your Edit Issue action on the automation rule, expand More Options and you'll see an option to not send an email for the update.

Like Rompicherla Kalyani likes this
Rompicherla Kalyani
Contributor
March 14, 2024

Hi @Mark Segall 

Hope you're doing well.

Can I ask you, is there a way to achieve this copying of parent value to other field basically the same requirement, can we achieve via workflow postfunctions on JIra cloud?

 

Thanks.

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2024

Hi @Rompicherla Kalyani - I'm not aware of a way to do this via post function natively.  You may be able to accomplish it with an add-on like scriptrunner.  Natively, you could do this with an automation rule using the Issue Transitioned trigger which will give the same result as a post function.

Like Rompicherla Kalyani likes this
Rompicherla Kalyani
Contributor
March 14, 2024

Thanks for the response @Mark Segall 

Its working perfectly fine with automation, but due to the usage limit issue.

Looking for an alternative for this.

Finally found a way to achieve this using post functions.

Its working as expected.

Like Mark Segall likes this
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2024

Would love it if you could share your post function solution. 

3 votes
Alexander Pappert
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.
July 8, 2023
Rompicherla Kalyani
Contributor
July 9, 2023

Hi @Alexander Pappert 

This helps a bit for my requirement.

Thanks for sharing.

3 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 7, 2023

@Rompicherla Kalyani -

Welcome to the community.  I am not sure I understand your ask, so are you stating that the automation rule did got fire, but it failed to copied the parent value of your cascade field into the new custom field (select list dropdown data type)?

If the above is correct, then do you have "Jira" defined as an valid option of the new custom field?  Secondly, the automation rule will only be triggered when the cascade field is changed.  So if the field is populated at the same time the issue is created, then the rule will not fired because the population of the field doesn't consider as a field value changed event.  Therefore, the new custom field will not be populated.

However, if the cascade field is populated after the issue was already created, then the rule should fired and populate the new custom field as long as the new custom field has the "Jira" as an valid option.

You should look at the Audit log of the automation rule to determine if the rule was triggered or not to validate the event.

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Rompicherla Kalyani
Contributor
July 9, 2023

Hi @Joseph Chung Yin 

Tried adding the option "Jira" under new list field that I created to copy the parent value of another cascading field.

Coming to Automation, cascading field parent value is copying well in case of copy to another text field, but in case of copy to another list field, how should we do that?

I choose Field value change rule, selected Cascade App as the field and on action chosen another list field as "Apps" what should I give the value for this new list field in automation rule.

Can you please let me know.

Thanks.

Rompicherla Kalyani
Contributor
July 10, 2023

Basically, my requirement is to get the 2dimesnional gadget with cascading field parent value.

Currently its showing different rows based on child value as well.

Statistics should be shown based on number of tickets raised for the whole application.

Please let me know if there is any way to achieve this on Jira cloud.

Thanks.

Rompicherla Kalyani
Contributor
July 10, 2023

When I tried Advanced automation script

{
"update": {
"Apps": [
{
"set": {
"value": "{{issue.fields.SelectApplication.value}}"
}
}
]
}
}

 

"Apps is a new list field to copy the parent value from cascade field"

Error I am facing:

 (Specify a valid value for Apps (customfield_ID))

Suggest an answer

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

Atlassian Community Events