I want to close epic automatically when the last issue is closed. The first condition after trigger (closing the issue) is a query wich checks if parent epic contains only closed tasks
issueFunction in issuesinEpics("NOT issueFunction in EpicsOf("status != Closed")")
This query doesn't work and i can't understand why Is it because of the issueFunction putted into another issueFunction? Is there any solution?
Hello @Ivan Mantrov
Are you working with Jira Cloud or Jira Server/Data Center?
I don't think you need to use the issueFunction option at all, depending on which type of hosting you are using. If you are on Jira Server/Data Center it would also depend on if you are using Automation Lite for Server or Automation for Data Center.
Here is an example of a rule that accomplishes your requirement.
This is valid for Jira Cloud and for Jira Data Center with Automation v8.1
Here is the solution from Stack Overflow:
issueFunction in issuesInEpics("NOT issueFunction in EpicsOf(\"status != Закрыт\")")
One should use a backslash before quotes in the function that is nested in another function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One solution could be to break the query into two separate JQL queries and use them together in your automation.
For example, you could first create a JQL query to find all issues in the parent epic:
"parentEpic=EPIC-123"
Then you could create a second JQL query to find all closed issues in that epic:
"status=Closed AND parent in issuesInEpic('EPIC-123')"
Finally, you could use these two queries together in your automation to check if the parent epic contains only closed tasks:
issueFunction in issuesinEpics("parentEpic=EPIC-123") AND issueFunction not in issuesinEpics("status not in (Closed) AND parentEpic=EPIC-123")
This way, you are not nesting issueFunctions inside each other and the query should work correctly.
Let me know the results please.
Regards
Oday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the proposed solution, but I didn't quite understand what "epic-123" means. If you know the name of the epic, then this method may be suitable, but when automating, the name of the epic is not known in advance
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.