Allow tokenization across -
We have a field which contains text entries in the form XX-YYY-####. We currently use the exact text searcher to aggregate a list of how many tickets contain duplicates. We would like to create a filter that would pick out specific YYY values.
The current behavior with the contains operator (~) seems to only work when the YYY value is listed as regular text (as a separate word) in the field, but not when it is in the standard form. That suggests to me that XX-YYY-#### is being tokenized as a single word, rather than as components. Alternately, if there were a way for contains to search any substring regardless of tokenization would meet our needs.
Concrete Example: "Affected Item" ~ "\"SIS\"" -> Entries with " SIS " in the field, but not entries with "XX-SIS-####"
Comments (8)
-
repo owner -
repo owner - changed status to on hold
Please use '.' instead of '-' to allow tokenization while retaining the correct indexed value.
If one have no control on the input itself or is bound to use '-' this could be done with a scripted field.
-
I am locked into the field format, unfortunately. I have never done a scripted field, but I will give that a try.
-
repo owner <!-- @@Formula: issue.get("customfield_10200")==null ? null : issue.get("customfield_10200").replaceAll("-",".") -->
-
So I have the script you described in a custom text field like in your first screen shot. I have updated the field ID to be the proper one too, but it isn't working. Do I have to input the script into another place? Another plugin perhaps?
-
repo owner the scripted field example is for https://marketplace.atlassian.com/plugins/com.innovalog.jmcf.jira-misc-custom-fields/server/overview
you will find the exact configuration steps here : https://innovalog.atlassian.net/wiki/spaces/JMCF/overview#JIRAMiscCustomFields-calculatedtextfield
-
Thank you. That seems to work.
-
repo owner - changed status to wontfix
if we chose to allow tokenization then it should be done with a configurable character or list of characters.
using a scripted field to handle the logic is an acceptable workaround (for now).
- Log in to comment
this is correct, XX-YYY-#### is being tokenized as a single word.
A simple workaround is to use '.' instead of '-', i.e : XX.YYY.####
this would produce exactly what you are looking for :
with the format 'XX-YYY-####' you can only match the beginning of a word and there seem to be an issue with the character '-' ..
you can match 'XY', 'XY-' but not 'XY-MMM' nor 'MMM'