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

How can I get the current project to use in a JQL query?

I would like to do something like:


project = currentProject() ORDER BY createdDate


Is that possible, or can it be added?

26 answers

What I want is for the board query to be based on the Project that the board is being viewed in from the user's perspective.  My typical user workflow is for the user to select "Project" and then pick a board in that project based.  For our company, boards are "Software", "Electrical", "Mechanical".  And effectively I'd like to be able to create reusable boards where the query is for the "Project" that is selected.  Our users never intentionally go to a board from the "Boards" dropdown.

Since the board can't reuse filters, I get into a lot of duplication right now.  For example, rather than "Software" as a board, I need "Project X Software", "Project Y Software", etc.  This also means I need to create "Project X Filter", etc.  Making both development and execution of a consistent process across multiple projects tedious (the only part that I get to reuse is the 'workflow', I need to manually copy both the boards and filters for each project in JIRA which is an admin headache and prone to manual bugs as a result).

If the filter was able to handle "Project" (and in the case of directly selecting a board, I'd be OK with the result = NULL) then I would have a total of 3 boards, each board would only one filter and I could share this board with every project that shares a given workflow with zero changes.  That is what I want to be able to do.

Thank you, Omar!

For those who aren't clear on the intent behind the question, Omar does a great job of explaining the underlying challenge that needs to be solved for - starting with "My typical user workflow..."

Like # people like this

We are facing right now the same problem as @Omar Mussa in our projects. Anyone finds a solution for that?

3 votes

There is no "current project" when you're in a search, they execute outside project contexts.

That's the problem we are trying to solve - we want to scope the results to a project, and we are looking for a way to do that.

Thoughts on how we can accomplish that?

I started another thread - a few weeks ago.

I thought I was going mad, missing something obvious with dashboard reuse (or the lack of functionality) but I'm somewhat relieved to find I'm not alone!

Thank you to Jack Nolddor for the JQL Booster Pack recommendation. The recentIssues() method is the best workaround I've found so far!

Hi @Frank_Spafford
 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.

Omar - I hear you. I don't have an answer for you (looking for the same thing), but what you're asking for makes complete sense. Your second post, the longer one, spells it out pretty well (Nic, you might want to re-read), but in a nutshell:

Most users would like (expect) to go into a project and be able to see all of the issues for that project (and JUST that project), presented in various useful ways: In a list. On a board. Or maybe on several boards, each having a different view/configuration.

Furthermore, many organizations have dozens or hundreds of nearly identical projects. And for consistency, each of those projects should be structured the same way. Same issue types, same fields, same workflows, same views, same boards. The issue types/fields/workflows are easy, we have schemes for those. But to make the boards consistent, we have to create and configure a separate board for every dang project! Which becomes extraordinarily cumbersome on so many different levels.

So... given this underlying problem statement, maybe the gurus can help identify the right way to solve for it. :-)

Hi Frank,

you can use the following Plugin to achieve this functionality:

It's working like a charm for us.

Best regards,


I wish this plugin were available for JIRA Cloud.

What Omar said, seriously how does Jira not have an option for "Oh your created a new project?" ..." Would you like a board like the other projects in this category or type? great, just click here and we'll copy that board over there just apply this project number for this board!!!" 

Seriously, stop making other versions of jira and just FIX WHAT YOU'VE ALREADY MADE A MESS OF!!!! GRRR. 

Sorry today is a day of atlassian rage! 

I would expect the current project to be the one that is displayed in the drop down that appears when  you click "Projects" on the JIRA menu bar.

0 votes

Just found this in the docs, I'm perplexed that none of these threads have mentioned it so far, is this new? Seems to work for me

project = "{{ }}" ORDER BY createdDate


In the new Jira experience, a Board always lives within a Project.

Wouldn't it make sense now to allow a Board filter that always queries the Project that the Board lives within? This would eliminate a great duplication of Filters...

No.  Because a board might include more than one project.

The move to have boards "inside" a project is understandable, but it's introducing even more confusion for users.

A board does NOT live within a project.  A project has a collection of links to boards that might include the project.


That seems at odds with what is stated here:

We redesigned the Jira experience to make the relationship between boards and projects much clearer. Now, boards belong to projects, so you can better manage multiple work streams in Jira Software.

Yes, and that statement is wrong.

It's horribly misleading.  Boards do not belong to projects.

When a board has a filter like "Project in (X, Y, Z)", which ONE project does it belong to?  Nope, can't answer that, because it's wrong.  That board does not belong to any one project, it pulls in issues from all three.

Atlassian phrasing it this way has already increased the numbers of people horribly misunderstanding how boards work.  It needs to be changed.

Both of these things are true though - Boards "belong" to projects in the sense that every board is assigned an owning project now. Boards can also "show" issues from across multiple project.

So, all the way back to the beginning of this, instead of describing this as "current project", think of it as, for a board, I just want to define a query like "project=currentBoardHostProject()" and have the issues on the board be filtered to those issues belonging to the project where the board is hosted. If I could create a filter that included syntax like that, then I could re-use the filter definition across a WHOLE LOT OF BOARDS AND PROJECTS. 

Nope, they don't.  There's a link derived from "this board includes a project", but that is not the same as "board belongs to project". 

And, as I've said before, a board can include issues from many projects, and projects can be shown on many boards.  So "project = currentBoard" could return many boards, and is useless on a board anyway, because you're already in the board.

@Glenn BurnsideI like it! I think we should have both:

  • project = currentProject()
  • project = currentBoard()

...and then build the dashboard selector to change projects OR boards.

But they can't work because you don't know what the "current project" or "current board" are unless you're inside them.  Yet again, please tell me what the "current project" is when I am looking at a filter for "project in (x, y, z)"

There's a wonderful technology called "cookies" (not a confectionery treat) that allows you to create continuity as you use a site. For example, how did that shopping site know that you currently have three items in your shopping cart? A simple website might actually store those three items in a cookie in your browser cache. As you move around the site, even though you haven't logged in, the site can recall your cart items.

The currentProject is the project I was just looking at, and the currentBoard is the board I was just looking at. If the board is a composite of more than one project, then currentProject would probably be an invalid parameter.

This is a basic web concept.

There's a wonderful technology called "reading the previous discussion" too.

I'm not sure what you're implying. I've read every post here and lots of other places asking for basically the same thing. Clearly, there is a need as described here that JIRA doesn't fulfill.

@Nic Brough _Adaptavist_, when I'm choosing which board I want to look at, the menu groups them in 2 sections:

  • "Boards in <project>" (where project is the project that I currently have selected, and which I would understand as "the current project"), that contains boards that as far as I understand, belong to the project that I currently have selected.
  • "Other boards", where there are some items that seem to live completely outside projects (for those, I agree that "current project" isn't well defined), and some that clearly state "<Board name> in <Project>". When I click on the latter, JIRA switches to that board and I see that the project that is now selected is the one where that board lives.

So clearly, some boards belong to projects. For those that don't, how a "currentBoard()" function would behave probably warrants further discussion, but I think the meaning is pretty clear for boards that live inside a project.

No, you've not understood what I wrote before.  Boards do not belong to projects, there is just some code that shows you when there is a relationship.

Bump? Lol.  I too would like to see this functionality within the jira cloud but understand (I think) what @Nic Brough _Adaptavist_ is getting at.  During a board's initial creation it was built to be flexible enough to PREselect project(s) to filter the boards contents by.  If JIRA introduced a currentProject parameter in JQL it would bug the system out.  I can understand his point that this could introduce a significant amount of complexity.  I think a reasonable feature request would be maybe focused around a step in the right direction which would be a new option in board settings. 


If we had an option to enable "Filter issues within the current project" JIRA could at least build testing against having this enabled and also a user unknowingly trying to select multiple projects.  I hope this makes some sense.  Thoughts?

I think you've got it.

I'm still waiting for someone here to define what the "current project" is when the board, dashboard, filter or report is set to look at "project in (x, y, z)".  Until that's answered, we can't get far with this.

Focussing on boards specifically (eg. Sprint or Kanban)...

It doesn't matter how Jira internally actually categorises and manages boards (it's a given that they're being obtuse about it, and it's confusing)... what is pretty darn clear to anyone not being an obstructive pedant is the repeatedly requested desire to have a board scheme (let's use generalised terminology that's commonly understood, and a Jira concept too).

At that point, it would be great if Jira would be kind enough to abstract that part of the query away from us (the current project from whose menu the board was accessed), and use some kind of interface to assign to Project(s) of your choice.

Like Glenn Burnside likes this
0 votes

That's correct - it's because the board defines the projectS it is for.

Again - what is the "current project" when your board filter is "project in (x, y, z)"

There are some add-ons which do "current project" in some places, but it's not based on the board, and can be misleading (because you could be in project w, then go to a board covering x, y and z), and can fail when you are using multiple tabs or browsers.

I want a filter that says give me issues that match a certain criteria where the project = ActiveProject.  From my perspective, ActiveProject is the project specified in the URL via "projectKey" parameter but there is no such property that I can find and filters don't seem to have a way to use the URL parameter as a criteria.  I don't want to have to specify a specific value (or even a wildcard) for the projectKey in my filter.  This will enable me to create reusable boards that support multiple projects.

0 votes

Ok, let's keep it really simple. 

You are asking for an answer to the question "what is the current project?"

The answer to that is "none, one, many or all".  Your problem is too limited to be usefully "answered" by that.  Your three "use-cases" are valid statements, but cannot be turned into useful requirements, and hence should be redefined in real terms or discarded.

To do that, you need to work out a way to answer the question: What is the "current project" when I am looking at a board whose filter says "project in (x, y, z)"

There is only ever one "current project" from a board user's perspective - the one selected in the JIRA user interface.

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

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


I think you've misunderstood the point.  You can't answer the question "what is the current project" when you're on a board that includes more than one.  There is no "currently selected project" when you're in a board, because the board might have more than one.

The only time "current project" can be answered for a board is when the filter has a project selection clause of "project = X".  Which makes it redundant.

The point is to be able to create a single dashboard--for example, "Sprint Health"--with a bevvy of lovely widgets showing all manner of current-sprint-filtered data. And then to allow that dashboard to be used for any project.

Currently, you'd have to create the filters for each project, save the filters for each project, create a dashboard for each project, add the widgets for each dashboard while specifying the filters for that project.

A colossal waste of time and data! ...if only dashboards had a configurable project context...

As in my reply to Robert, it could be optional (overridden by the queries used in a widget, locked down at the dashboard level...maybe the dashboard has it's own project query which itself could be limited to a query string related to projects and therefore include a single named project, multiple projects based on project attributes, or a "chooser" allowing the user to pick a single project or maybe even multiple projects via Ctrl+Click for the widgets on the dashboard. You could add a separate configuration checkbox to ignore dashboard filter, just in case individual widgets had project filters, so you'd be compatible with current dashboards that are single-query-threaded.

Dashboards are not boards, and the question still stands, what project is the current one when your board filter is "project in X, Y, Z"

I'd agree that it would be nice to have a "project dashboard" though, I'd locate them in projects myself, then you wouldn't need a selection at all.

I shouldn't have said "Board", but rather "Dashboard". [corrected in original reply]

And when I said "current boards that are single-project-threaded," [I changed the wording to single-query-threaded in original reply] I intended you to understand that in some to-be, useful dashboard configuration setting that allows you to apply project(s) context to a dashboard (like the Rich Filters add-on allows, though much more convoluted), you might also want to have an "Ignore" function so that your existing dashboard widgets that already have project filters could still function as intended.

Overall, I think you missed the forest for the trees again. The purpose is to NOT have to create SEPARATE dashboards using SEPARATE filters for EVERY project.

No, I'm not missing the forest for the trees, I think it's you who is.  You're ignoring the fact that we're looking at a forest and you want to report on the "current tree" without knowing which one it is.

I don't want to create separate dashboards either, I totally agree with you.  My ideal case would be to have project owners be able to create dashboards in the projects, where you do know the "current project"

Nope. You missed it again. Let me try a more specific example:

I have 500 JIRA projects.

I have one concept of the perfect "Sprint Health" dashboard.

I do not want to build 500 Sprint Health dashboards.

I want to build one Sprint Health dashboard and let everyone use it.

When a user loads the dashboard, the system performs thusly:

  1. Use the user's last-accessed project to filter the set of all project data for the widgets on the dashboard.
  2. Allow a user to specify a different project (live search) or multiple projects (Ctrl+select from list). Refresh the dashboard with the new set of project data.
  3. Allow a dashboard configuration to Ignore/Hide this "project context" at the dashboard level and rely solely on the widget configurations (legacy mode).

No, you've not read the second paragraph of my last comment, where I've agreed with you and suggested a more simple way to do what you are looking for, while keeping the existing dashboard system simple and intuitive.

I see that second paragraph. What I don't see is how creating a dashboard "in a project" solves my 500-projects-1-dashboard problem. Please elaborate.

Also, I'd like to amend my proposal to incorporate the idea of @Glenn Burnside: Be able to select EITHER a project OR a Board in order to filter a dashboard.

...AND as a general issue query, add persistence of some kind to indicate current context, whether a project or a board. Maybe this option is a general user preference or, better-yet, en easy-access menu option to toggle between current board or current project (if current board is a composite of multiple projects, then gray-out the current project option).

Ok, sure so your project argument could be "*" or "ALL" or whatever the JQL equivalent is - sorry, not null.  But it doesn't mean that there shouldn't be a solution for the problem I'm facing.  I don't see why all of three use cases ("*", "NULL" and "ActiveProject") aren't valid project arguments.

0 votes

That's wrong. My project context is absolutely not "null", as that's useless.  It's "all projects".

Also, I'm not saying that all board queries would need to have an active project context.  I just would like to be able to have one for my case, which is in creating a project/context specific query for making a reusable board.

In your case it would be "NULL" which is a valid answer to me.  In my case (shown here) it would be "SWPD":



0 votes

>project that the board is being viewed in from the user's perspective.

Changing  the wording "project context" to "the user's perspective" does not change the point.  I have a board that shows "issue type = bug".  What's the project context or user's perspective there?

0 votes

>CurrentProject is the project context my board is currently being viewed in

Boards are not viewed in a project context.  Or rather, the "project context" is "one, many or all projects".

Lists of issues can be filtered by "Current User".

Why not allow them to be filtered by "Current project"?

Because there isn't one at the place you're looking at.

I could use this feature so that I could create a filter that is used by multiple projects - specifically for creating more reusable board filters.  Personally, I want to find issues of type = "somecustomtype" + status = "open" + project=CurrentProject where CurrentProject is the project context my board is currently being viewed in.  I'd be open to using the CurrentProjectFunction from the plugin below but it isn't supported in cloud.

Keep working on this Omar. You are spot-on!!

I understand that is what you want to do but it is not what you want to ultimately accomplish. Why do you want to do that? What key information would that give you that you seek?


Robert, I would like to view issues in my "currently selected view project" and order the issues by created date, using a saved filter.

Frank, what are you trying to accomplish with your JQL query? Maybe there is another way to accomplish what you want if we knew what information you were ultimately trying to have at your disposal.

0 votes

That would be a nightmare - you'd have a filter that could apparently randomly change every time you went back to it.  I don't think that's a good idea (I'd certainly hate having to explain it to all the users)

What would change about the filter?

It would work as consistently as "Current User" does.

Like Glenn Burnside likes this

I would like to have the "last viewed project" available to JQL.

That would allow me to create a single filter that could be used for any project, and would apply to the last viewed project. (I would not have to create the filter for each project of interest.)

0 votes

That's the "last viewed", as Robert says.  A function for that is not a lot of use in a query, and useless in a saved filter.

Other tools, including general purpose tools like Microsoft's SQL manager, application level databases like IBM's ClearQuest, and products like ApTest, all have a notion of the "current database or project"; all have included in their query the ability to reference the "current project (or database)". It is super useful in a saved filter, especially for large organizations.

This is the same reason "Current User" is super useful in a saved filter.

Ok, so try this:

  • Log in.
  • Go to "issue search"
  • Tell me what the "current project" is at this point?

That's hard for me to do, because I always log into a project so that I can see what I'm supposed to focus on.


However, imagining the state that you have suggested then the current project would be "*" (i.e. all projects).

It's not hard to do, it's impossible.  You can't tell what the current project is in my worked example because it does not exist.  If you assume "all projects", that's fine, but useless, as that's what Jira is already assuming.

The closest you can get is "last project", and even that is not particularly useful.  Imagine I view issue ABC-123, so you can say the last project I used was ABC.  Now I go to a search and use a query that includes "and project in (DEF, GHI)" or "project not in (ABC)".  What's the last project now? 

Like Pierre-Luc Bégin likes this

Nic: You wrote "If you assume "all projects", that's fine, but useless, as that's what Jira is already assuming."

Well, in the scenario that you provided I would not be any worse off than current Jira behavior; however, if I am working in the context of a project, it would help. 

When you're working in a place where you have a project context, you don't need a "current project" function because you already have it.

That's not what seems to happen.

For instance, if I'm looking at the Open Issues for a project (the top left says "Projects / <project name>" , and below that "Open issues".

I then click the "star", and select my filter to run it, I now get results from all projects.

Are you saying that I should only see the issues from my current project which "pass" the filter criteria?

As soon as you run a filter like that, you're outside the project context, so it's showing "all"

This is an old one, but it's driving me mad as a new Jira user.

First I tried "next gen", until I found out I have to recreate workflows, statusses and what not for every project.

So I switched to Classic. I can use a workflow in numerous projects, but I have to recreate to Kanbanboard for every project. I can copy the board, go to the filter, copy the filter, change the filter, go back to the board, change the selected filter. It's easier to recreate the board from scratch.

So, as to the existential question "What IS the current project", well: it's the one that shows in the left sidebar on top. I would like to have a filter function for 'the project that shows in the left sidebar on top'. Filter may return empty if there is no such project, that's just fine.

No, it is not.  That is "the last project Jira can identify you as using".  There is no "current project" when you're outside the context of a project, as you can be in boards, searches and reports.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events