You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I want to create a filter that will display all JIRAs in a portfolio based on who the current user is. Something like this:
Portfolio in (currentUser(portfolio))
Is there a way to do this? Are there traits within the currentUser keyword?
Just to clarify, you are using Jira cloud premium and want to have an Advanced roadmaps (Plan) that shows everything assigned to whoever looks at that plan based on a filter using the current user functionality?
If so, I have just done an experiment. I used the following JQL:
assignee = currentUser() AND statusCategory != Done
and yes!!! It works.
So it seems the assignee = currentUser() is all you need. How you configure beyond that, is up to you.
I am looking for more than what is assigned to them - you may have multiple Reporters / Requesters who are in one portfolio, so I want to make it dynamic that whenever anyone from that portfolio checks the filter, it will only show up with issues that they are also in the same portfolio.
(And since you can have a number of different portfolios, this needs to be done by "currentUser()" or something like that in order to pull everything up that is in that portfolio.)
In this case, your definition of "Portfolio" is the contents of a Jira Plan, is that right? or am I missing something??
I am not sure how to answer your question, so let me give you a bit of background:
Each user has different "assignments" - users can be assigned to permissions Groups and have different access levels within JIRA, and they are assigned to a Department (based on Company Org Chart). Departments roll up into "Portfolios" which is how we track requests. (So, someone in Marketing and Finance can be in 2 different departments, but their departments roll up to 1 portfolio - as an example.)
So, I want to take the currentUser(), see what portfolio they are in, and give them a filter to see all requests within that portfolio. (So the user in Marketing can see all all requests in this Marketing / Finance Portfolio, and the user in Finance would see the same. However someone from HR would use the same filter and see what is in their Portfolio...)
Hope it is a bit clearer.
Are the Departments groups in Jira? if so, something like this:
assignee in membersOf("Marketing", "Finance") and assignee = currentUser()
By the sound of it, the Portfolio isn't defined in Jira directly anywhere, is that right?
Also, what do you use Project category for, as defining each project to its portfolio would mean you could have a filter like>
category = "Portfolio 1" and assignee = currentUser()
then the current user would see issues assigned to them from any project with the Portfolio 1 category.
OK, cool. But how is a Portfolio currently defined in Jira? As that is key to how to approach this.
If (for instance) you used Project categories, then the JQL is something like:
category = "Portfolio 1"
plus any other conditions you may want to apply, like "Status != Done" or whatever.
If a portfolio is defined by a certain group of Jira projects, but not categorised, then the JQL would be along the lines of:
Project in (ABC, XYZ)
If a portfolio is defined by the people in a Jira group or groups, then:
assignee in membersOf("Marketing", "Finance")
though this wouldn't show unassigned issues, so perhaps not an ideal approach?
If a Portfolio has been defined in Advanced roadmaps by pulling together various filters, boards or whole projects as the issue sources, then via that Advanced Roadmaps Plan, is the simplest way for someone to view that Portfolio.
No. currentUser() is just a way of creating JQL that will show what is relevant to the person that evokes it. Be it assigned to, or reported by, or any other "User Picker" field you may have.
Any extra tricks are performed by expanding the JQL. i.e.
project = ABC and assignee = currentUser() and statusCategory = "In Progress" ORDER BY duedate DESC
Beyond that, I am still unsure of how your Departments and Portfolios are defined in Jira. But seeing you have posted this in the Advanced roadmaps group, my recommendation would be to have an Advanced roadmap plan for each Portfolio and direct the people to it to view all that is in that portfolio. From there they can filter to view what is important to them.
You could have views for each Department within a given portfolio as well as any other "views" required or desired.
If so, I have just done an experiment. I used the following JQL:assignee = currentUser() AND statusCategory != Done
and yes!!! It works.
This works on its own as an issue source... but as soon as you add any other issue sources (other filters, projects, boards), or even expand the same filter/query with addition criteria, the issues included in the above expression disappear.
I suspect this is a bug or limitation in Advanced Roadmaps, and I've raised a support ticket with Atlassian to investigate further.