Forums

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

Automation Rules Logic: Due Date & Issue Field Conditions

Dean Milenkovic January 23, 2024

I am trying to create a rule that will o the following:

When an issue is created -> IF Epic Name contains "abc" OR "def" -> THEN Create Tasks

I am trying to interject a few things into this: 

1. If the Epic Name also contains "xyz" I would like it to supersede the "abc", "def" etc and not create new tasks. (I have attempted this by creating the very first condition be DOES NOT CONTAIN but tests still created the tasks.  

2. How do I add specific issues to DEPENDS ON in Linked Issues field such as the tasks created within the same automation rule.  The task 4 will depend on Task 2 and 3, while Task 6 will only depend on Task 5 etc. 

3. For a BEGIN DATE field, what code can trigger adding an XX days to this tasks but only once the Task #1 has been moved into Todo (status change)?

4. For DUE DATE field, what code can trigger adding XX days to this task but only once the Task in front of it has been marked as completed (status change)?

Screenshot 2024-01-23 124518.pngScreenshot 2024-01-23 124429.png

Thanks,

Dean

 

1 answer

1 accepted

1 vote
Answer accepted
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.
January 23, 2024

Hi @Dean Milenkovic -- Welcome to the Atlassian Community!

First thing: the Epic Name field has essentially been sunset, replaced by using the Summary.  Are you still trying to use the old field?

 

You have quite a few questions there, and they cannot all be answered using one automation rule.

1. If the Epic Name also contains "xyz" I would like it to supersede the "abc", "def" etc and not create new tasks. (I have attempted this by creating the very first condition be DOES NOT CONTAIN but tests still created the tasks.  

For this one, I recommend splitting the conditions to perform the test on "xyz" first and separately from the other ones.  That will help to diagnose why this is not working.

 

2. How do I add specific issues to DEPENDS ON in Linked Issues field such as the tasks created within the same automation rule.  The task 4 will depend on Task 2 and 3, while Task 6 will only depend on Task 5 etc. 

Without seeing your entire rule...I suspect you have a several Create Issue actions in the rule.  To create dependency link for the issue created immediately before, use the smart value {{createdIssue}}

But if you are referring to different ones in the sequence (e.g., "task 4 will depend on Task 2 and 3"), I suggest saving the key after each issue is created in a variable with a known name, and then refer to that.  For example

  • action: create your task 2
  • action: create variable, named varTaskTwo, with the smart value {{createdIssue.key}}
  • action: create your task 3
  • action: create variable, named varTaskThree, with the smart value {{createdIssue.key}}
  • ...
  • later referring to {{varTaskTwo}} and {{varTaskThree}}

 

3. For a BEGIN DATE field, what code can trigger adding an XX days to this tasks but only once the Task #1 has been moved into Todo (status change)?

For this one, the rule could be triggered on the transition to Todo, and you will need a way to uniquely identify that this is your "Task 1", and then edit the issue or branch to the ones which need to be edited.  This seems like a one-off or very specific scenario; anything you can do to make it more generic will help.

 

4. For DUE DATE field, what code can trigger adding XX days to this task but only once the Task in front of it has been marked as completed (status change)?

Same as for #3: issue transitioned and need a way to identify the relationships / issues.

 

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events