Match Functions
issueFieldMatch
issueFieldMatch (subquery, fieldname, regexp)
Query on any field by regular expression. Performance will be roughly proportional to the number of issues selected by the subquery, so use the query that selects the smallest set of issues you can, eg just your projects. On my dev machine this function handles around 20k issues per second.
To find all issues where the description contains a ABC0000 where 0000 is any number, you could use:
issueFunction in issueFieldMatch("project = JRA", "description", "ABC\\d{4}")
For a case-insensitive match, prefix the match string with (?i) - for example:
issueFunction in issueFieldMatch("project = JRA", "summary", "(?i)foo")
Note - you need to double the backslashes. Note - the function searches for the reg exp anywhere within the field. To match the entirety of the field, use ^ and $, e.g. ^ABC\\d{4}$.
issueFieldExactMatch
issueFieldExactMatch (subquery, fieldname, regexp)
Find issues by matching the text of a field exactly. The intention behind this function was to work around issues where the Lucene word stemming makes exact matches difficult.
Previously it was incorrectly documented that it was for an exact regex match, and may have even behaved like that. This was a bug. If you were using it like this you can achieve the same behaviour by using issueFieldMatch by specifying the start and end of line regex tokens. Eg previously you might have had:
issueFunction in issueFieldExactMatch('Some Custom Field', 'b.d')
which would have matched only when the custom field was bad, bid, etc etc. To get the same behaviour you should change it to:
issueFunction in issueFieldMatch('Some Custom Field', '^b.d$')
Note - you need to double the backslashes. Note - the function searches for the reg exp anywhere within the field. To match the entirety of the field, use ^ and $, e.g. ^ABC\\d{4}$.
For a case-insensitive match, prefix the match string with (?i) - for example:
issueFunction in issueFieldMatch("project = JRA", "summary", "(?i)foo")
projectMatch
Match the project name by regular expression.
projectMatch(reg exp)
componentMatch
Match the component name by regular expression.
componentMatch(reg exp)
For example, find all issues that have a component beginning with Web:
component in componentMatch("^Web.*")
versionMatch
Match the version name by regular expression.
versionMatch(reg exp)
For example, find all issues in the JRA project that have a fix version beginning with RC:
fixVersion in versionMatch("^RC.*")