Hi community,
I use a labels wildcard search [1] because we have some issues regarding standardized labeling. My problem is I find wrong issues.
My query:
issueFunction IN issueFieldMatch("Project = SomeProject AND Type = SomeType", labels, "(?i).*desiredLabel*")
I have 3 queries:
- 2 characters long string (example: ix)
- 4 characters long string
- 5 characters long string
The 4 and 5 char long queries are finding the right tickets/labels. The problem is the 2-chars long string query.
I get tickets with partial strings like "this-label" or "triple-x" but not what I want like "*ix*". Even if I remove the first part "ix*" I get the same results. Only if I remove the wildcards completely I get the right results, but I need that wildcard/RegEx search. Anyone knows what I can do?
I tried:
- "(?i).*ix*" -> multiple issues found with partial string (e.g. "whitelisting")
- "(?i)*ix*" -> Syntax error
- "(?i)(*ix*)" -> Syntax error
- "(?i)(ix)*" -> Finds all issues
- "(?i).*(ix)*" -> Finds all issues
- "(?i)(ix)" -> multiple issues found with partial string (e.g. "whitelisting")
- "(?i)^*ix*$" -> Finds nothing
Maybe the ScriptRunner does not search only in "labels"? Because eventually the partial string appears in title, another (custom) field or description. Probably also in linked tickets.
[1] https://mraddon.blog/2018/11/19/jql-trick-how-to-search-for-labels-with-a-wildcard-expression-in-jira-server