Hello All,
I am looking for a way of using Jira Automation for closing Epics that have specific issue types closed (in moved to specific status or resolved). The issue I am facing that what I have come up with will not work as we also use XRAY issue types such as tests and these will never be closed or removed in these Epics. Thus, I would like to exclude the XRAY issue types (e.g. Test) from the automation. In other words when all of my Stories, Tasks, Bugs are done or resolved, I would like my Epic to also be marked as done, even thou there will be some tests linked to it that are not done or resolved.
Did any of you had such a challenge and managed to solve it?
Hi @Adam Ziecik
What about using the JQL (or related issues) condition to find all issues with the same parent, and which are not issueType Test, and which are not done? If there are none, proceed to transition the epic.
Generally, if you can write JQL to answer a question, a rule can use that JQL for deciding actions.
Kind regards,
Bill
@Bill Sheboy Thank you for responding. Could you shed a bit more light on this possible solution. I have tried using JQL and related issues conditions but it did not work. Maybe I used it incorrectly. Also, how could I find all issues with the same parent and add this to an automation when the parent is not a specific parent?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When creating JQL for use in a rule, it can help to create it stand-alone first using a specific example, in advanced issue search. Then change it to be generic using a smart value.
From what you described, you could try this in the rule (substituting in your project name):
project = myProjectName AND Parent = {{triggerIssue.parent}} AND issueType != Test AND statusCategory != Done
And testing the condition "Are not present" to confirm there are none.
Also, I am using Jira Cloud, so please substitute "Epic Link" for "Parent" if that is what your version of Jira is using for the Epic -> Child issue relationship.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy - thank you again for responding.
When I try to use this JQL in Jira Automation Project rules:
parent = {{triggerIssue.parent}} AND issueType not in (Test, "Test Plan","Test Set","Test Execution", Sub-task) AND statusCategory != Done
it transforms it to the following one with the error displayed below:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting...let's be even more specific with this, adding the key to the parent check:
parent = {{triggerIssue.parent.key}} AND issueType not in (Test, "Test Plan","Test Set","Test Execution", Sub-task) AND statusCategory != Done
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy - unfortunately, the same is still occurring and gives the same error:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No idea, as just parent should have worked.
Would you please post images of your current rule and of the audit log details showing the execution? Perhaps we are missing some context by only looking at part of it.
And just to confirm, you are using Jira Server (or Data Center), correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy - Yes, we are on Data Center.
Here is the Automation:
And the error:
Project key is the same in all as this is an automation on a project level.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let's try creating a new rule, avoiding any possible things broken under the hood for this one. After creating the rule, let's see what happens. Rules can get glitched if they are edited too many times...I have no idea why.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy - thank you again for your input - it is much appreciated!
I have implemented the automation as you instructed, but the problem with it is that it will transition the Epic to Done when any Story is transitioned to Done, even though there are other Stories that are still not done. What I was trying to achieve is that the transition of Epic to Done will only happen when all of the standard Jira issues (e.g. Stories) will be done and exclude the XRAY issue types from this automation rule. Do you have any idea how this could be achieved?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That seems to indicate a problem with the related issues condition, or its JQL.
Have you tried to use the JQL with an example epic to get it to work how you want, and then try that in the rule for the condition?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy - you are correct, it is the part of JQL parent = {{issue.key}} that did not work. Instead I have used "Parent Link" = {{issue.key}} and it works as it should. Thank you very much for all of your support.
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.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.