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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,455
Community Members
 
Community Events
184
Community Groups

issueFunction in another issueFunction

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?

3 answers

2 accepted

3 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.
Mar 25, 2023

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

Screen Shot 2023-03-25 at 12.59.44 PM.png

0 votes
Answer accepted

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

0 votes
Oday Rafeh
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.
Mar 25, 2023

@Ivan Mantrov 

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

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events