Hi,
I am trying to create an automation in JIRA:
1. Check every day in all the stories/issues of our team.
2. If the epic/feature where these stories belong has a due date in the next 5 days, then change the priority of the issues (NOT THE EPIC) to Critical.
I have tried many iterations but can't seem to be able to make it work. It does change the priority of the epic, but not of the stories.
Hi @Mr Available -- Welcome to the Atlassian Community!
You have most of the pieces, but your rule structure is a bit off. Your rule's branch is looking for stories, as if the trigger issue was an epic...which does not seem to be what you want.
This rule can be done without a branch, as many of the issue's parent's fields are available directly, using conditions: https://support.atlassian.com/cloud-automation/docs/jira-automation-conditions/
For example...
Kind regards,
Bill
Hey Bill,
Thanks a lot for the answer. This isn't still fully clear to me ( I am super new to this).
Any chance you can make this more stupid proof for me?
Questions:
How do I check if an issue has a parent? All my stories (issues) are part of a feature (parent?). Does the rule need to double check?
How can I use the issue.parent.duedate? I don't want a specific value, I want every day to check if the epic due date is within the next 5 days.
Basic reason for this: I want to increase alert level for my team in case the epic is close to delivery but we still have things to do. So for the last 5 days before Epic completion, I want to make all the remaining open stories of that epic critical so we can prio them.
Cheers,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As a tip, using automation rules successfully requires learning and experimentation. Otherwise if one just uses rules created by others it will be difficult to maintain or improve them.
If you review the documentation at the links I provided, you will find several ways to check if an issue has a parent, or not.
With the date comparison to the due date, the same applies. For example, this expression returns the number of days from now until the due date:
{{now.diff(issue.duedate).days}}
or in business days (Monday - Friday), that would be this:
{{now.diff(issue.duedate).businessDays}}
And so an advanced compare condition can check if that is within the value you want to check.
Pausing to reconsider your scenario, we can see that multiple issues for the same epic could lead to repeated attempts to check the parent. And perhaps it is better to invert this: use a scheduled trigger on JQL which only checks the epic using the startOfDay() function:
trigger JQL: project = yourProjectName AND issuetype = Epic AND duedate = startOfDay(5d)
And then the issues within the epic can be tested for Team and issuetype = Story, and Priority not set to Critical, with a branch on JQL:
branch JQL: project = yourProjectName AND issuetype = story AND parent = {{triggerIssue.key}} AND statusCategory != Done AND priority != Critical
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.