Using Jira automation to copy a custom field value from one sub task to another with same parent

Gordon Rutherford May 26, 2023

Hi All

Using Jira DC I am trying to automate the  copy or present  the info in a text custom field that is added to a subtask, into another subtask using Jira automation.  The fields have the same name. The both have the same parent. I may be missing something but you can easily do it between parent and subtask, linked issues etc but can't work out how to do it from one subtask to the other with the same parent.

I would also like to have a condition in the automation in that the copy only takes place if the two subtasks have the same custom field date.

Any help would be appreciated

Thanks

Gordon

1 answer

1 accepted

2 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2023

Hi Gordon,

Can you share the automation rule that you have so far? And where it is failing for you? 

Gordon Rutherford May 26, 2023

Hi John

Thanks for your input here and apologies should have posted a rule in my original question  - anyway since I posted I was able to get the field to update using the rule posted below - what I need now is the condition that it only updates the subtask that has a matching date to the trigger subtask

rule.PNG

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2023

Progress - great!  Ad the end, try adding another Branch for Sub-tasks. Then place an Advanced Compare Condition below that comparing {{issue.Date Field}} equals {{triggerIssue.Date Field}} where Date Field is the exact name of the date field you are using. 

Gordon Rutherford May 26, 2023

Hi John

Assume you mean to replace my JQL branch with subtask - which I have done but then it doesn't find 'any' subtasks.

Also separately is my syntax correct in the compare values condition?rule 2.PNG

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2023

So you are changing the value for a parent issue. That parent issue has sub-tasks and some of those subtasks have the same value for the date field. Correct so far? 

Are the Fri Date and Go Live Date fields the same types of fields (both date fields and one does not include Time? 

You might also try removing .fields. - you don't need that. Not sure that would cause it not to work, but you never know. 

My suspicion is that the values in the two date fields are not EXACTLY the same. Meaning one has a time stamp on it that does not match the time stamp of the other. 

Gordon Rutherford May 26, 2023

Hi John 

No I am changing the value on a subtask and if that subtask date field matches another subtask date field then the value is added to the 'other' subtask.

I have made it work using the below and jql to select the subtasks to update, which your condition is working for. I will need a condition for each of the 'daily dates' as there are 7 subtask that may be updated ( this is a weekly activity)

So I think I am good thanks to your 'condition help'

Cheers 

Gordonrule 3.PNG

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2023

Great! Yeah, the Sub-tasks branch would not work if you are starting with a sub-task. It can only be used if the trigger issue is the parent of the sub-task. Anyway, enjoy the weekend!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events