Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL example for Cloud not working as solution to deprecated Server JQL

Jeff Hayes
Contributor
August 4, 2022

Hi, 

My company is newly moving from Server to Cloud and many of the Scriptrunner JQL filters we use in server are not working in cloud.  There are error messages which we have used to view documentation on what is supposed to be changed, but those items aren't working, either.  In fact, even the example queries in the documentation (Many of which are written incorrectly with missing parens and such) don't even work.  

 

The first filter I have  uses the following on Jira Server to find all epics which have no assigned stories:

project = <project name> AND issuetype = Epic AND resolution = Unresolved AND issueFunction not in hasLinkType("Epic-Story Link") ORDER BY key ASC

 

When we run that on Cloud, we get the following error:  

Your JQL includes the [hasLinkType] function from the [Adaptavist Scriptrunner] app for Jira Server. This function works differently in Jira Cloud. Refer to https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions for details or contact the app provider.

So I go to that link and it indicates that now we should be using the "epicsOf" function to do what we want.  In fact, they even have an example (with the wrong number of parens) which supposedly does this. 

 Jira Software users can also query on epic links to find all epics which do contain any issues.

project = <ProjectKeyHere> and issuetype = Epic and NOT (issueFunction in epicsOf("project = <ProjectKeyHere>")

Plugging it into Cloud, we get the following:

Your JQL includes the [epicsOf] function from the [Adaptavist Scriptrunner] app for Jira Server. This function works differently in Jira Cloud. Refer to https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions for details or contact the app provider.

 

So this is saying we are using a Jira server function, even though this is the example we were directed to in the Cloud documentation!

 

So, thoughts?

 

Thanks,
Jeff

 

 

7 answers

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2022

Based on this page:

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/comparison-with-scriptrunner-for-jira-server

...you can't do queries like that directly in the Advanced Issue Search screen. It looks like you have to do those in ScriptRunner's Enhanced Search screen.

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/scriptrunner-enhanced-search-jql-queries

I was successful in running the filter there.

 project=CK and issuetype=Epic and not issueFunction in epicsOf("project=CK")
Jeff Hayes
Contributor
August 5, 2022

Thanks, Trudy.  Unfortunately, I don't see that enhanced search as an option on our Cloud site.

 

2022-08-05 08_19_24-[All Epics with No Assigned Stories] Issue navigator - Jira.png

Like • Mark Gormley likes this
Jeff Hayes
Contributor
August 5, 2022

I'm assuming it has something to do with IT not having synched the Enhanced app with our projects?

 

JQL Keywords Sync - Jira.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 5, 2022

@Jeff Hayes 

ScriptRunner Enhanced Search appears under the Apps menu. It is a separate screen from the built-in search screen.

Screen Shot 2022-08-05 at 9.14.45 AM.png

I was able to run the filter from that screen without synching the issues. Note that even after synching the issues the epicsOf function can't be used in the built-in search screen.

Jeff Hayes
Contributor
August 5, 2022

Interesting.  I wonder why I don't see the link to that type of search like you showed in the original reply?  Thanks!  I need to go through and see how to change all our other filters now.  

Jeff

0 votes
Trudy Claspill August 4, 2022

Hello @Jeff Hayes 

Reference these pages:

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/comparison-with-scriptrunner-for-jira-server

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/scriptrunner-enhanced-search-jql-queries

At least some Scriptrunner functions can't be used directly in the built-in search screen. There is a new Enhanced Search screen provided with the app that you may have to use.

The query you asked about works in that screen.

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2022

Hello @Jeff Hayes 

At least some of the ScriptRunner functions can't be used directly in the Advanced Issue Search screen. There is a new Enhanced Search page that comes with Scriptrunner for Jira Cloud. This same query works in that page.

References

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/comparison-with-scriptrunner-for-jira-server

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/scriptrunner-enhanced-search-jql-queries

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2022

Hello @Jeff Hayes 

I found another page from about the differences between Scriptrunner for Jira Server and Cloud.

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/comparison-with-scriptrunner-for-jira-server

Based on that page it looks like at least some of the Scriptrunner functions can't be used directly in the Advanced Issue Search screen. Instead the queries have to be run through an Enhanced Search screen. 

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/scriptrunner-enhanced-search-jql-queries

I tried the query there and it works there.

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2022

Hello @Jeff Hayes 

Based on this page

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/comparison-with-scriptrunner-for-jira-server

it appears that at least some of the Scriptrunner functions can't be used directly in the Advanced Issue Search screen, and instead the queries have to be run through an Enhanced Search screen. The query works there.

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/scriptrunner-enhanced-search-jql-queries

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2022

Based on this page

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/comparison-with-scriptrunner-for-jira-server

it appears that at least some of the Scriptrunner functions can't be used directly in the Advanced Issue Search screen, and instead the queries have to be run through an Enhanced Search screen. The query works there.

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/scriptrunner-enhanced-search-jql-queries

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2022

Based on this page:

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/comparison-with-scriptrunner-for-jira-server

...it appears that some Scriptrunner functions can't be used directly in the Advanced Issue Search screen in Jira Cloud. You have to use their Enhanced Search screen.

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions/scriptrunner-enhanced-search-jql-queries

I was able to run the query successfully from there.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, loom, AI, meeting recording, community

[NEW] Record your meetings with Loom

Welcome to great meetings, with less work. Automatically record, summarize, and share instant recaps of your meetings with Loom AI.

Learn more
AUG Leaders

Atlassian Community Events