Is issueFieldMatch() case-sensitive ?

Denis Moore January 11, 2018

Hi All,

When I run the following query it only returns tickets with "Error" in the summary field and not "error". I'm running Jira 7.3.8 on Postgre and Adaptavist Scriptrunner 5.2.2

issueFunction in issueFieldMatch('project=SD AND created>startOfDay()', summary, 'Error')

Tanx for looking

2 answers

1 accepted

0 votes
Answer accepted
Daniel Yelamos [Adaptavist]
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.
January 17, 2018

Yes, this is correct. I think it is case sensitive.

Cheers!

Dyelamos

Denis Moore January 19, 2018

Thanks for the update Dyelamos.

I think it would be more useful if it was not case-sensitive.

Regards,

Denis

Daniel Yelamos [Adaptavist]
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.
January 19, 2018

Well not at all.

What if you are looking for a key for a project that was "KEY" for example. Would you want to fetch the issues that casually mention "key"? 

No. This is ASCII, there is a huge subset of characters to be used for a reason.

Since this question is answered, feel free to mark my question as accepted so that other users know that this question has been answered.

Cheers!

DYelamos

Denis Moore January 19, 2018

Thanks for the update.

How about adding adding an extra parameter to the method which would allow either a case-sensitive or non case-sensitive search?

Regards,

Denis

Daniel Yelamos [Adaptavist]
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.
January 19, 2018

That is an entire different matter. I actually agree that could be of use. Feel free to submit a feature request at www.productsupport.adaptavist.com

Cheers!

DYelamos

4 votes
Wolfgang Kindl April 12, 2018

I tried the case insensitive switch and it worked for me:

issueFunction in issueFieldMatch("project=SD","Summary","(?i)error")

Ady Stein September 2, 2019

@Denis MooreI think @Wolfgang Kindl's answer should be marked as the accepted answer, because it is both more accurate and what people are actually looking for (meaning issueFieldMatch is neither case sensitive nor case insensitive; it uses a regex that can be defined either way).

Like Tony likes this
SWAPNIL SRIVASTAV December 5, 2019

Hello @Wolfgang Kindl ,

I tried using the same on my instance. JQL i used:

issueFunction in issueFieldExactMatch("project = ABC", "Summary", "(?i)Test") 

I know there is an issue with summary "test", but the JQL does not return it as a result.

Script Runner version 5.5.9

Jira version: 7.13.5

Using JIRA through server

Could you please help

Thanks and Regards,

Swapnil Srivastav

Suggest an answer

Log in or Sign up to answer