ScriptRunner enhanced search functions are not visible in main jira search

Ashwin Balakrishnan March 1, 2019

We use Jira cloud. We recently installed ScriptRunner Enhanced Search - Adaptavist

add-on. When I login to Jira, I can see the following sections

image.png

I can go to "ScriptRunner Enhanced search" and I can write queries like 

issueFunction in linkedIssuesOf("project = xxx") and it works fine. 

But when I go to "Issues and filters" section and run the same query, I get 

Field 'issueFunction' does not exist or you do not have permission to view it.

How can i integrate this add-on to main jira query search ?

 

1 answer

1 accepted

4 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 4, 2019

Hi Ashiwn,

Thank you for your question. 

I can confirm that in JIRA Cloud you can only use the issueFunction() JQL function provided by ScriptRunner on the Enhanced Search page as described in the documentation here.

This is due to the way that Atlassian restrict how the JQL functions can interact with their infrastructure meaning we must run them in a sandbox process.

However this does not mean that they cannot be used inside other filters inside other filters or on filters for Agile boards, and to use the functions in other filters then you will need to follow the steps outlined below.

  1. Navigate to the enhanced search page and construct the filter you require using the JQL functions provided by ScriptRunner.
  2.  Save your filter and share it with the users that are required to be able to see it.
  3. Create the JQL search used by your board filter or quick filter and reference the saved filter using the syntax shown below which will return the results of your filter using the JQL functions provided by ScriptRunner.

filter = "<NameOfFilterHere>"

If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.

Regards,

Kristian

Ashwin Balakrishnan March 4, 2019

Perfect

Farbod Nejati May 10, 2021

This does not solve the problem IMO.

@Kristian Walker _Adaptavist_ this appears to save the filter and its current set of results. Meaning that if the result changes then the saved filter is not impacted. 

So for example

  1. if you save "issueFunction in epicsOf("project = ABC")" as 'test_filter'.
  2. create a new epic with an issue inside it
  3. re-execute the query: "issueFunction in epicsOf("project = ABC")" and you will see the new epic in the search results
  4. then go to normal Jira search and do "filter = test_filter" you won't see the newly created epic in the search results
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2021

Hi Farbod,

The way enhanced search works is that any changes to the enhanced search filter are synchronised to the regular Jira filter every X minutes depending on the value you configure on the settings page as documented here.

Also when the filter is shared you must toggle the Sync Filter button for this to happen as documented here.

This unfortunately is caused by how the enhanced search works in Jira Cloud and how Jira Cloud is different to Jira Server meaning we cannot allow the enhanced search functions to be run in the regular Jira Search.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer