(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?
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?
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...
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