Forums

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

JQL Query with issueFunction not working (ScriptRunner Enhanced)

Theresa Barnard November 22, 2024

Hi Everyone,

 

I am new to Jira and I have had to learn JQL very fast. We have also migrated to the cloud.

I have this JQL query working in the old Jira environment but not in the Cloud. I have tried to run it in ScriptRunner Enhanced Search but I can not get it to work.

What am I doing wrong?


project = XXX AND issuetype = "Request for Enhancement" AND resolution = Unresolved AND issueFunction in linkedIssuesOf("resolution != Unresolved", blocks) AND NOT issueFunction in linkedIssuesOf("resolution IS EMPTY", blocks)

 

Thanks
Theresa

1 answer

1 accepted

1 vote
Answer accepted
Sushant Verma
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 22, 2024

Hi @Theresa Barnard 

Welcome to the community!

Migrating from an on-premise environment to Jira Cloud can introduce some compatibility challenges with existing JQL queries, particularly those involving advanced functions like those provided by ScriptRunner. By breaking down the query into smaller components and testing each part individually, you can identify where the problem lies and adjust accordingly.

Ensure you have ScriptRunner installed and properly configured on Jira Cloud. The issueFunction operator is specific to ScriptRunner. Test each linkedIssuesOf function separately. Once individual parts work, combine them incrementally.

project = XXX AND issuetype = "Request for Enhancement" AND resolution = Unresolved 
AND issueFunction in linkedIssuesOf("resolution != Unresolved", blocks) 
AND NOT issueFunction in linkedIssuesOf("resolution IS EMPTY", blocks)


Regards,
Sushant Verma 

Theresa Barnard November 22, 2024

Thank you for the answer.

I have managed to break it down a little but as soon as I use a issueFunction in the Swimlane it gives an error.
But the query did work in ScriptRunner.
What am I doing wrong?

Theresa Barnard November 22, 2024

Can you even use the issueFunction in swim lanes?

Sushant Verma
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 22, 2024

@Theresa Barnard When working with swimlanes you might encounter errors when trying to use specific functions like issueFunction. This can be due to various reasons, including compatibility issues or incorrect syntax.

Regards,
Sushant Verma

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.
November 22, 2024

Hi Theresa,

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 because Atlassian restricts how the JQL functions can interact with their infrastructure, meaning we must run them in a sandbox process.

However, this does not mean they cannot be used inside other filters or on filters for Agile boards or in calls to the Search rest API.

To use the functions in other filters, you may follow the steps outlined below.

  1. Navigate to the enhanced search page and construct the filter you require using the JQL functions provided bv 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>"

Using this approach, you will be able to use your filter in swimlanes on agile

I hope this helps.

Regards,

Kristian

 

Like Hana Kučerová likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events