Hi,
I want to compare 2 fields in a simple JQL:
I want to find all issues in a project that the "Summary" field has the same text as "Acceptance Criteria" (custom field).
How can I do it without plugins?
Thanks!
Dear @Orit Nachshon,
unfortunately you cannot do this. JQL ist not SQL. It has not the ability to compare two fields. Only fields with values/functions can be compared.
So long
Thomas
I definitely agree with Thomas.
There might be many ways using plugins or direct SQL or scripting but JQL is meant to search/filter so it's pretty basic, or at least not embedding calculation features.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use Adaptavist script runner function:
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}")
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. |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may use Adaptivists ScriptRunner expression like:
issueFunction in expression ("", "Summary != customfield_1234")
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.