Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

issueFunction in issuesInEpic() function causes issues with starting sprints Edited

(issueFunction in issuesInEpics("project = TEST") AND status not in (closed, resolved)) OR (project = TEST AND status not in (closed, resolved)) ORDER BY Rank ASC


Above is the JQL I'm using with the added JQL from ScriptRunner. The problem is when using this query on a board users who have manage sprint permissions in the projects are unable to create a sprint. It seems this is because Jira doesn't know what projects are being pulled so the user would need permissions in all the projects. Is there a way to modify this query so Jira recognizes the projects associated? 

2 answers

0 votes

The problem is the reading of the second clause in the first set of braces before the OR.  "status not in (closed, resolved)" could return issues from every project in your system.

If you were to add "and project in (list of projects where your people do have the rights for admin)" inside that first brace, then it should work.

The "status not in (closed, resolved)" is after an AND statement so it should only apply to the results pulled in from issuesInEpic()


I've attempted this as well. After adding all of the projects to the list, it just shows "This board contains 29 projects". But this is because I specifically listed them.

(project in ("20+ projects listed") AND issueFunction in issuesInEpics("project = RODR AND issuetype = EPIC") AND status not in (closed, resolved)) OR (project = RODR AND status not in (closed, resolved)) ORDER BY Rank ASC

No, that's not true, it doesn't matter where it falls in the conjunction of the AND.  You've also got the problem that an Epic in Test could also draw in an issue from any project.

You need to explicitly limit the entire query to projects that your people have permissions for.  Might be simplest to take your original query and just say "project in (a, b, c) AND <your query>"

Looking at the backlog. There are roughly 58 issues in it (more are added as time goes on). Each respective project the issues reside in the user has Manage Sprint permission. 

I'm not sure what is the difference between what you're telling me at the end and what I've posted above.

I think the issue is actually in

issueFunction in issuesInEpics()

The subquery there is selecting the project that contains the Epics, but the issues in those Epics could be in any project.

It seems like adding the additional clause of 

projects in ("20+ projects listed") AND

...should've addressed constraining the projects in which the child issues would be selected. Are the users still unable to start sprints after you added that clause? Do the users have Manage Sprint permissions on the 20+ projects?

Yep the user has permissions for every project that appears in the board.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

326 views 9 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you