Forums

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

Dynamicaly changes the parent ticket field based on the sub-task field

Lakshmi CH
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.
June 18, 2024

Hi Team,

We are looking for the configuration to update the parent ticket field value based on the sub-task field value.

The requirement is :

If the main task has "n" number of sub-tasks, and if the "Scheduled Completion Date" of any subtask is changed to a later date(farthest), we should update the main task with that date. 

Ex : If subtasks "Scheduled Completion Date" are sub-task1 = June 23, sub-task2 =July 20, sub-task3 = July 26, etc., and a user changes any of these sub-tasks to August 12, the main ticket should also changes to August 12th.

 

 

 

 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
June 18, 2024

Hello @Lakshmi CH 

Have you looked into creating an Automation Rule to handle that?

https://confluence.atlassian.com/automation/

You could create a rule triggered by a change to the sub-task date field.

Then you would branch up to its parent.

Within the branch you would use Lookup Issue to look up all the subtasks.

From the Lookup Issues results you could access the maximum value of the date fields and copy that to the parent issue in an Edit issue action.

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.
June 18, 2024

Hi @Trudy Claspill 

I do not believe Lookup Issues action for Jira Data Center supports custom fields yet: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877

Perhaps using the {{issue.subtasks}} smart value will allow access to the field.  If not, the workaround using Send Web Request and the issue search REST API would be required to set the parent field.

Kind regards,
Bill

Like Trudy Claspill likes this
Trudy Claspill
Community Champion
June 18, 2024

Good catch, @Bill Sheboy !

Lakshmi CH
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 5, 2024

Hi @Trudy Claspill,

 Do you have any examples of this kind of automation ?

Trudy Claspill
Community Champion
July 6, 2024

@Lakshmi CH 

1. Trigger: Field Changed: specify your date field

2. Condition: confirm the change occurred in a Sub-task

3. For Related Issue: Parent -- changes the focus of the rule to the sub-task's parent issue.

4. Log action: this will print the value that you will next be updating into the parent issue.

5. Edit Issue - this edits the parent issue.

The smart value used in 4 and 5 is {{issue.subtasks.<your date field>.max}}

That smart value will get the maximum value in the specified field from all the subtasks.

Screenshot 2024-07-06 at 8.49.49 PM.png

Lakshmi CH
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 9, 2024

Thank you @Trudy Claspill . Its working as expected.

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer