I'm working with the JQL below to retrieve issues assigned to current user that are in open sprints and have the "To Do" status across all their projects. The statement below has the current user's two active projects hard coded in ("Product" and "QA"). I am hoping to make this more dynamic so that I can share it across users.
How can I reference the current user's complete list of projects using JQL to replace these hard coded project names?
Any help is appreciated!
project IN (Product, QA) AND assignee = currentUser() AND status = "To Do" AND sprint in openSprints() ORDER BY Rank
Hello @Matt Richards
The search screen is for finding issues, not projects. There is no UI feature to get you an explicit list of only the projects where a user has assigned issues.
If you wanted to reduce the issue search list so that you could see a concise list of the projects rather than each issue then you could do something like use the Two Dimensional Filter Statistics gadget on a Jira Dashboard to organize the issue search results into a table of issue counts across Projects and issue statuses.
Thanks for your reply, Trudy. I am not looking for a UI feature. As I mentioned, I am working with JQL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Perhaps I am not understanding your question.
There is no JQL function for retrieving just a list of projects. JQL is designed for retrieving issues.
As you discovered, you don't need to have the "project in" criteria in the JQL statement. Omitting it will get all the issues assigned to the currentUser() across all projects.
Are you still looking for a way to get a list of project based on a criteria related to currentUser()?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I cannot use JQL to retrieve a list of projects, then no.
I do have a question related to that 2d issue gadget you showed. I created one of my own and I'm seeing two "To Do" status columns, one from each of the two projects.
By chance have you see this before, or might you have an idea as to why it happened? We have not customized our statuses at all. The projects are basically bare bones.
Thanks for your thoughts and responsiveness.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using Team Managed projects in your instance? If so, the Statuses in the workflows are each considered a unique Status value with a unique numeric ID in the database, even if the human readable name of the Status is identical to a Status in another project's workflow
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.
Having written this I realize now that if I am explicitly looking for ALL projects I could probably just remove this:
project IN (Product, Matt) AND
To yield:
assignee = currentUser() AND status = "To Do" AND sprint in openSprints() ORDER BY Rank
So... that works, but it would still be useful to know if it is possible to retrieve the complete list of projects for a user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.