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.
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.
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
Hello @Kristian Walker _Adaptavist_
This ticket is quite old and I'm facing exactly the same issue
First the syntax "" is no longer working
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
Can you help me solve my issue ?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.