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

Set a child issue's "Due date" based on another child issue's status change date

Elif Alverson July 25, 2023

Hello, 

Is it possible to set a epic's child issue's due date based on the same epic's another child issue's status change to "done" ? Here is what I have and it seems like there is a disconnect between the the two tasks of the same epic. Any suggestions? Thank you.

Screenshot 2023-07-25 at 2.54.04 PM.pngScreenshot 2023-07-25 at 2.54.32 PM.pngScreenshot 2023-07-25 at 2.56.11 PM.png 

1 answer

1 accepted

2 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.
July 25, 2023

Hello @Elif Alverson 

You have not selected the correct branch option. Notice the description of that branch.

Screen Shot 2023-07-25 at 12.30.18 PM.png

It works when the trigger issue is an Epic. Your trigger issue is the child issue of an Epic.

Do you expect to update more than one sibling issue?

To access the trigger issue's siblings you could use the Related Issues / JQL option to retrieve the sibling issues and iterate through them.

Elif Alverson July 25, 2023

@Trudy Claspill , it works only for one child issue. I need two child issue's due date to be changed. I used JQL summary ~ "Send Heading into Day 1 email" or summary ~ "test" , but it only works for the first task. What can I do this to work on the second ( maybe third task in the future)? Thanks you.

Like John Funk likes this
Elif Alverson July 25, 2023

@Trudy Claspill , this automation changes all the tasks with the summary  summary ~ "Send Heading into Day 1 email" instead of the last one created. How can I block that and make it doable only for the latest created epic's tasks?

Like John Funk likes this
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.
July 25, 2023

Can you provide a fuller explanation of the use case with sample data, and the updated version of the rule that you have currently?

Like Elif Alverson likes this
Elif Alverson July 25, 2023

This is an automation for a department for the "Plan an Office Gathering" epic request (Example) with child tasks/subtasks. This epic is a template with a few tasks and subtasks associated with it. There are multiple of these epics/tasks/subtasks with the same summary field and they are sill not resolved. The request is to use one of the tasks resolved status date as the due dates of couple of other tasks. Here is the screen shots of the change and the audit details. Let me know, if it makes sense or have any questions. Thank you.

 

Screenshot 2023-07-25 at 4.10.54 PM.pngScreenshot 2023-07-25 at 4.10.39 PM.png

Like John Funk likes this
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.
July 25, 2023

One thing you need to do is add into the Branch JQL criteria to pick the siblings of the current issue; i.e.

"Epic Link" = {{triggerIssue.epic.key}}

As you have it currently written it will return all issues with matching summaries regardless of their parent epic. ;-)

You may also want to include criteria to exclude Epic and subtask types of issues, just in case they have a matching summary. Those should be excluded by the "Epic Link" criteria, so adding the issue type check to the JQL shouldn't be necessary.

Within a single epic would you expect the summary to match more than one issue? And, if so, would you want all the matching issue updated? If you don't want all the matching sibling issues updated, what do you use to decide which ones will be updated?

Like John Funk likes this
Elif Alverson July 25, 2023

@Trudy Claspill , added "Epic Link" = {{triggerIssue.epic.key}} to the automation and it created 28 of the same tasks ( Send Heading into Day 1 email and Test), set the due dates to now and closed them :) We use the same epic name for this Epic Template. Is that why there are 28 of these two tasks are created?

Screenshot 2023-07-25 at 8.09.09 PM.pngScreenshot 2023-07-25 at 8.09.27 PM.png

 

  • Within a single epic would you expect the summary to match more than one issue? No, there is only one task or subtask with the same summary with in the epic. But we have numerous epics, tasks and subtasks with the same summary. The difference is the description, reporter, ticket creation date etc.
Like John Funk likes this
Elif Alverson July 26, 2023

@Trudy Claspill , I think the reason why there are 28 of the same tasks attached to the latest epic is ; there are total of 28 epic templates with the same epic name created and each one of them other than the last test one were closed. When I ran the automation, it carried all the closed tasks with the same summary field ( Send Heading into Day 1 email and Test ) to the latest epic. 

What do you think?

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.
July 26, 2023

You did not edit the rule correctly. You needed to modify the JQL in the branch, not change the Edit Action.

 

One thing you need to do is add into the Branch JQL criteria to pick the siblings of the current issue; i.e.

"Epic Link" = {{triggerIssue.epic.key}}

Screen Shot 2023-07-26 at 10.56.23 AM.png

What your last change did was again select all the issue with a matching summary, regardless of their parent Epic (so, not getting just the siblings of the trigger issue), and then change all of them to be children of the parent Epic of the trigger issue.

You will need to modify each of those changed issues to assign them back to their original parent Epics.

Like Elif Alverson likes this
Elif Alverson July 26, 2023

@Trudy Claspill , so all I need to change is to add 

summary ~ "Send Heading into Day 1 email" or summary ~ "test" and "Epic Link" = {{triggerIssue.epic.key}

into the add into the Branch JQL criteria? This does not work.

Screenshot 2023-07-26 at 2.40.10 PM.png

 

P.S: I am testing this in the sandbox so no worries about the due dates etc. Thank you.

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.
July 26, 2023

You left off the second closing curly brace:

{{triggerIssue.epic.key}}

Additionally I recommend putting the OR conditions in parentheses:

(summary ~ .... OR summary ~ ...) AND "Epic Link" = {{triggerIssue.epic.key}}

That will ensure that all the retrieved issues must be children of the same epic as the trigger issue, and then pare that list down to the ones with matching Summary values.

Like Elif Alverson likes this
Elif Alverson July 26, 2023

@Trudy Claspill , It is working. Thank you so much as always. I have two questions.

  1. When I run the JQL (summary ~ "Send Heading into Day 1 email" or summary ~ "Test") AND "Epic Link" = {{triggerIssue.epic.key}} in the filters section I get the message of "Error in the JQL Query: The character '{' is a reserved JQL character. You must enclose it in a string or use the escape '\u007b' instead. (line 1, character 93)" . How come it works in the automation while it does not in the filter section?
  2. I need due date to be set to 5 days after the trigger task is closed. What would be the smart value for that expression? 

Screenshot 2023-07-26 at 8.22.50 PM.png

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.
July 26, 2023

1. Because the syntax for JQL within an Automation rule recognizes smart values, which are encapsulated in curly braces. Standard JQL syntax elsewhere can't interpret smart values and so can't deal with the syntax

2. If you look here

https://support.atlassian.com/cloud-automation/docs/smart-values-in-jira-automation/

You'll find a link to a page about smart value options related to date and time values. On that page you will find a variety of functions you can use with date/time fields and smart values. You'll want to look at the .plus[Unit] function. If your field is just a date field vs. date/time field then you may also need to look at the formatting functions to convert the date/time value of now to just a date.

Like Elif Alverson likes this
Elif Alverson July 26, 2023

@Trudy Claspill , thanks for the documentation and all the help. Smart value is "{{now.plusBusinessDays(5)}} ". 

Like Trudy Claspill likes this

Suggest an answer

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

Atlassian Community Events