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

JQL to select current project from JIRA Agile

JIRA Agile has the notion of a "current" project.

For instance, if you select a project from the Projects drop down menu, the left panel shows the currently selected project.

Is it possible to limit a JIRA Agile board to issues in the currently selected project?

What would that JQL look like?

I would think there would be a currentProject() function, along the lines of the existing currentUser function.

We are using JIRA Agile Cloud.


3 answers

1 accepted

1 vote
Answer accepted

Hi Gabriel,

The current project context you see does not carry over to JQL, that is only in the issue search.  There was recently a good discussion about this that you can find at How can I get the current project to use in a JQL query? In addition, here is a link to the Advanced Search knowledge base for JIRA that contains the functions and search patterns that JQL will recognize.



The idea is to make a board show only issues related to the currently selected project, even when the board's backing query otherwise selects from multiple projects.

This would be useful when a board covers multiple projects but we're only interested in the selected project.

It's really a pity we can't pull this off.

0 votes

No, there's no function, and I'm afraid as a generalisation, it would not work, as the concept of "current project" only applies in some places.

Imagine the JQL as asking the question "what is the current project?".  If I go to a board that has a filter of "project in (A, B, C)" or "issue type = bug", what is the current project?  You can't answer the question.  You can only answer it authoritatively in certain contexts - when you're looking at an issue or a project header really.

Yes, and the place it would make sense is in board queries in Jira Agile, which is exactly where we need it. Statefulness is oddly presented in agile boards already, giving the sense that they are bolted onto the rest of JIRA (they are, obviously).

I get that JQL is a general thing and that the currentProject() function would not make sense in all contexts.

I don't think that's a good reason for such a function not to exist. It could return null in contexts where no current project exists, for instance.

Thanks for your reply.

But that could easily lead you into a situation where two users get totally different boards when they're looking at the same one. 

The context matters here, and the boards can not give you that context.  The function would need to return "null" when used in a board.

Hi @Gabriel Bauman
 If you are using Jira Server you can install the FREE app called JQL Booster Pack throught Atlassian Marketplace and use the requested functionality.

After install this app, you should be able to create a query using recentProjects() function, that will allow you to find issues in your recently viewed projects. You can also limit the number of projects retrieved by this function to get the most recent project.

You can use the following query to retrieve issues of your currentProject.

• Find issues in my current project:

project IN recentProjects(1)

You can find the complete information about this JQL function at its Function Reference page.

Kind regards.

Hi Jack,

Thank you for letting us know about the release of this add-on!  I'll keep in mind for the future.



Its great that there is an add-on.

Unclear why the originators of the tool could not be convinced of the need for the function.

Suggest an answer

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

The add-in you’ve been waiting for: Jira Cloud for Excel 🙌

Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...

839 views 5 22
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