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

How to add (not copy) a value from sub-task to parent issue

FredYeung January 20, 2023

Dear all,

Please help suggest adding (not copying) a custom field value from the sub-task to the parent issue. Many Thanks.

Regards and Thanks,

Fred 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 20, 2023

Hello @FredYeung 

Welcome to the Atlassian community!

What type of field is the field in the subtask?

Are you trying to update the same custom field in the parent issue or a different custom field? If a different field, what is the type of that custom field in the parent issue.

FredYeung January 20, 2023

Dear @Trudy Claspill

Thanks for your reply. Let me provide more information.

In my case, I have 1~5 sub-task for each team to fill in the deploy step (custom field[Text]) to a parent issue with the same custom field. If I use copy from the trigger issue, it will overwrite the text to a parent issue. Could you suggest how to update/add text value from sub-task to parent issue without overwriting? Many Thanks.

Regards and Thanks,

Fred 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 20, 2023

You would need to use the More Options feature in the Edit Issue action to edit the parent issue custom field using JSON code to append the task from the subtask to the text already in the field in the parent issue.

This page provides information on the Advanced Editing feature:

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

I haven't fully worked through the scenario with a proof of concept. You may have to record the current value of the parent issue field in a variable you create in your Automation rule.

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-variable

Then in the JSON assign a new value to the field by concatenating the original value and the additional text from the subtask, using the smart value for that variable and the smart value for the custom field in the subtask.

If you are having trouble figuring out the rule, please show us the entire rule you have so far and we can provide additional guidance.

FredYeung January 20, 2023

Hi Trudy,

Thanks for your reply. I have tried below Advanced Editing feature but failed. Would you share a sample example with me? Many Thanks.

 

Error message: does not support operation 'add'

Additional fields:

Screenshot 2023-01-21 111842.jpg

Regards and Thanks,

Fred 

FredYeung January 20, 2023

Hi Trudy,

I am successfully working on the below setting; thanks for your lead me. Many Thanks.

Screenshot 2023-01-21 123215.jpg

 

Result:

Screenshot 2023-01-21 123257.jpg

 

Regards and Thanks,

Fred 

Suggest an answer

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

Atlassian Community Events