Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Field Automation

Ahmed Yousif August 2, 2024

 

I am trying to copy a custom field value from parent issue (story) to (subtask) when the field value is updated: 

This is what i used for an automation rule and Json code but i get an error Screen Shot 2024-08-02 at 3.53.33 PM.pngScreen Shot 2024-08-02 at 3.53.41 PM.pngScreen Shot 2024-08-02 at 3.53.49 PM.pngScreen Shot 2024-08-02 at 3.53.56 PM.pngScreen Shot 2024-08-02 at 3.54.04 PM.pngScreen Shot 2024-08-02 at 3.56.21 PM.png


 

Can anyone please help with that? 

1 answer

1 vote
Marc - Devoteam
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.
August 2, 2024

HI @Ahmed Yousif 

Welcome.

What type of custom field is product categorisation, single select, multi select, etc..

Is this field on the screen used by the sub-task?

Ahmed Yousif August 2, 2024

Hello Marc, thanks for your reply! 

yes i made sure it's in the screen used by the subtask, and almost every project/screen where all the issue types are part of. It's a select list (cascading)Screen Shot 2024-08-02 at 4.09.26 PM.pngScreen Shot 2024-08-02 at 4.04.59 PM.png

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.
August 2, 2024

Hi @Ahmed Yousif -- Welcome to the Atlassian Community!

Adding to Marc's suggestion...

That appears to be a cascading selection field, and so the JSON syntax is different:

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

And...you may need to use conditional logic to handle the possibility when the parent-value is set and the child-value is not.

Kind regards,
Bill

Like Hans Polder _Devoteam_ likes this
Ahmed Yousif August 12, 2024

Hello Bill, 

 

Thanks for your reply, i have used the cascading Json as suggested and it worked. 

 

now i have couple of rules that do the following seamlessly: 

  • When creating an epic, and custom field is added, the stories/subtasks created underneath fetch the value (Done) Rule 1
  • When a story that has no parent(epic) but already been created before, once added to an epic and has a value of a parent, the story fetches the custom field value from the epic (Done) Rule 2 Screen Shot 2024-08-12 at 4.02.01 PM.pngScreen Shot 2024-08-12 at 3.57.26 PM.pngScreen Shot 2024-08-12 at 3.57.33 PM.png


One challenge is: 

  • For an existing epic, when the value of the custom field is updated, the stories underneath copy the value to the story level perfectly, but it doesn't do it automatically for the subtasks of these story ( i have to go and update the stories manually in order to reflect on the subtasks) 
  • i have added a rule where when the story parent changes (which will be triggered by Rule 2 for an example) to go and update the subtasks custom field value as shown in the screenshots, but seems like it's not working.
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.
August 12, 2024

By default, the actions of one rule do not trigger other rules.  This is to prevent errors and accidental rule recursion.

For example, you have a rule triggered on updates to the Epic to update the Story, but by default that will not fire the rule triggered on updates to the Story to update the Subtasks.

 

When you want one rule's actions to trigger another, in the downstream rule, enable this option in the rule details, and test fully:

Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.

Please try enabling this option in your rule which updates the Subtasks when the Story's field changes.

Suggest an answer

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

Atlassian Community Events