Forums

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

trouble with IssueFieldMatch for Labels with ScriptRunner

Mike Shkolnik
Contributor
May 1, 2018

I can't seem to get IssueFieldMatch working for ScripRunner in relation to Labels.

a normal search for: labels = "AC-1" returns 6 results.

a ScriptRunner search for: issueFunction in issueFieldMatch("","labels", "AC-1")

returns nothing. What am I doing wrong?

What I really need is to use a wildcard for all labels that start with "AC", for example. This would find AC-1, AC-5(23), AC-OMG, etc.

 

1 answer

1 accepted

2 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Champion
May 4, 2018

Hi Mike,

Thank you for your question.

I can confirm that you can run a wild card search for labels starting with AC by running the JQL search below inside the ScriptRunner enhanced search panel on Jira Cloud.

 issueFunction in issueFieldMatch("", "labels", "^AC")

This will return all the labels that match as shown in the screenshot below.

Screen Shot 2018-05-04 at 11.32.19.png

If this answer has solved your issue can you please accept it in order to mark this answer as correct for users who are searching for a similar issue.

Regards,

Kristian

Corinne Guibert
Contributor
May 23, 2025

Hello @Kristian Walker _Adaptavist_ 

 

This ticket is quite old and I'm facing exactly the same issue

First the syntax "" is no longer workingCapture d’écran 2025-05-23 194929.jpg

 

Then I tried to restrict the search on a specific project but the result is Empty, see screenshot below with Enhanced Search on the left and normal search on the right

 

Capture d’écran 2025-05-23 195257.jpg

Can you help me solve my issue ?

 

Thanks

Kristian Walker _Adaptavist_
Community Champion
May 27, 2025

HI Corrine,

For this issue can you please raise a support ticket here, and our support team will help to diagnose this issue.

Regards,

Kristian

Corinne Guibert
Contributor
May 27, 2025

Hello @Kristian Walker _Adaptavist_ 

I can't open a support ticket because I don't have the SEID and my Jira admin is on leave (will be back on June 16th)

Any other way you can provide help ?

Kristian Walker _Adaptavist_
Community Champion
May 27, 2025

Looking at your error, I see you have not filled in the text to match as the first parameter, and this is why your expression is invalid.

Checking the docs for issueFieldMatch, the parameters to provide are:

issueFieldMatch(Subquery, FieldName, Pattern Match)

This is why you get the error when the subquery is not present.

Your regex in the screenshot provided with the subquery specified is valid and should match. I have tested it on my instance to confirm it is valid.

It could be caused if your JQL keywords have not been synchronised by your Jira admin, and they would need to synchronise these. 

If this doesn't solve the issue and you need further assistance, then you will need to raise a support request so that our support team can investigate the cause of the issue in your instance further.

I hope this helps.

Regards,

Kristian

Corinne Guibert
Contributor
May 27, 2025

Hello @Kristian Walker _Adaptavist_ 

 

Thanks for your feedbacks.

In 2018, an empty 1st parameter was allowed (see your answer on the first question). I guess this has changed with the newer version then.

I raised an internal request for the JQL keyword synchronization, although  I have lots of other Enhanced Search filter that are working well so I assume that the initial synchronization has been done at one point

Kristian Walker _Adaptavist_
Community Champion
May 27, 2025

Hi Corine,

Yes, the parameters required have changed since this original question was asked.

If you still have issues, a support ticket will be required so they can help investigate the issue in your instance further.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events