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
Community Members
Community Events
Community Groups

Is there a way to display all JIRAs in a Portfolio based on the Current User?

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?

1 answer

1 accepted

0 votes
Answer accepted
Curt Holley Community Leader Dec 19, 2021

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.) 

Curt Holley Community Leader Dec 20, 2021

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.  

Curt Holley Community Leader Dec 20, 2021

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.

I do not want to look at the assignee of the task - I want to show everything that is related to the Portfolio (or department) that a person is in, regardless of if they are the assignee or not. 

Curt Holley Community Leader Dec 21, 2021

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.

It is assigned similar to department based on the user who submitted the request.

To go back to the original question: Is there a way to create a filter to display requests based on an attribute of the currentUser()? 

Curt Holley Community Leader Dec 22, 2021

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.

Advanced Roadmaps Home | Advanced Roadmaps for Jira Cloud | Atlassian Documentation

Thank you - I did not realize but I must have posted in the wrong place. 

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events