We have (ScriptRunner) a scripted custom field Affected Sub Domains, gathering Information from all linked issues of an issue type "Software-Tool"
The scripted field uses the "Free Text (mult line)" template and is configured to use the "Free Text Searcher".
Dependent on if there are one or more linked issues, the calculated text field contains a string, representing a (comma separated) list of values.
Concrete examples (yes, the value is really just one character)
"Affected Sub Domains" = "A" (there's only one linked issue, which has a custom field "Sub Domain" with value "A")
"Affected Sub Domains" = "A, C" (there are at least two linked issues, where one has a custom field "Sub Domain" with value "A" and another linked issue where "Sub Domain" = "C")
A simple search like:
project = ITT AND issuetype = Software-Tool" (displaying the "Affected Sub Domains" field)
returns all expected issues and Shows values like "A", "C" and "A, C" in the "Affected Sub Domains" column.
Now trying to restrict the results to only a sub set, where Affected Sub Domains contains "C", it seems to work with this query:
project = ITT AND issuetype = Software-Tool and "Affected Sub Domains" ~ C
It results in a list of matches, where Affected Sub Domains is either "C" or "A, C". All issues, where Affected Sub Domains would only be "A" are not returned.
So, this is how we expect it to be.
But, now performing a search, which should only return issues which belong to Sub Domain "A", the following query does not return any results (NOTE: it's exactly the same JQL as abobe with only the value Changed from C to A)
project = ITT AND issuetype = Software-Tool and "Affected Sub Domains" ~ A
Any Explanation and Suggestion how to make it work?
We already tried to work with other searchers like the "Exact text searcher" and both searchers from the "Natural Searchers for JIRA" plugin.
No success so far.
Any hint is very welcome.
Hello @Klaus Foerschl
I personally find using the native tild operator a bit unpredictable at times, thus If I have to write JQL like in your case to match string or part of it then I try using the Script Runner's JQL functions
Can you modify your JQL to try any one of the above functions instead.
https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html
Hi Tarun. Thanks a lot for this hint. It works perfectly well. I was not yet Aware about all those JQL script functions. So, i learned for the future.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.