Is it possible to use project variables in JQL

John M Dubil June 25, 2022

Jira Data Center v8.2   w script runner.

Is it possible to use project variables in JQL?

I am looking for a way to group our Jira projects by function/type.
 - Client Support
 - Product Development
 - Administrative

And then be able to query things like "all open issues in Client Support Projects".

Our projects already have used Project Category to segregate the projects by department. (So that was not an option)


I was hoping there was a way to use project variables in such a way that I could construct JQL which basically returned...

... a list of projects where the ProjectType varaible was "Client Support"
... and all jiras in those projects which were open.

Any thoughts or other approaches?

Example.png

 

2 answers

1 vote
Dam
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 25, 2022

Hi @John M Dubil ,

As I see in Scriptrunner doc, there is no JQL functions to help you get your project variables in a JQL search: 

https://docs.adaptavist.com/sr4js/latest/features/jql-functions/included-jql-functions

I can't find documentation about the project variables also, strange... 

You can maybe code your own JQL function to get your project variable, I'm not even sure its possible but you can write custom JQL function with Scriptrunner: 

https://docs.adaptavist.com/sr4js/latest/features/jql-functions/custom-jql-functions

 

As you pay for a license for Scriptrunner, I would ask directly support to Adaptavist team in. this case... cause there is a little lack of documentation here: 

https://productsupport.adaptavist.com/servicedesk/customer/user/login?destination=portals

Sorry but I can't help you more here... 

Cheers,
Dam. 

0 votes
Andrea Pannitti
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2022

Hi @John M Dubil,

how reported in official JSU's documentation, currently, project variables are only used in conjunction with 'Create a Linked Issue'. So it isn't possible to use it in a JQL query.

John M Dubil June 26, 2022

Yeah, that's what I found as well.  I was hoping there was another way around it, or someone knew of a plug in way. 

Or some other way of querying the jiras of "this kind of project..."   which would be self maintaining  vs ....  a project a (clientA, clientB, clientC...)  kind of mess which needs to be adjusted every time we get a new project on for a new client. 

Suggest an answer

Log in or Sign up to answer