JIRA ~ JQL How would i use MAX to limit a query

83 views Asked by At

Im writing a JIRA JQL query to query my project for defects and stories. Im trying to limit the query to select these types, select its custom field (cf[12901]) which is a number ex: 53. The trick here is this number changes on different tickets so i want to basically grab the MAX() of this this field. So i could grab multiple tickets that all meet the criteria of the MAX. Data example:

  • ticket 1 cf[12901] = 53
  • ticket 2 cf[12901] = 52
  • ticket 3 cf[12901] = 53
  • ticket 4 cf[12901] = 50

so the query should return tickets 1 & 3

project = "xyz" AND (cf[10005] is not EMPTY AND cf[10005] in closedSprints()) AND cf[12901] is not EMPTY AND type = Defect AND component = "abc" AND status = "Done" and (assignee = P3171324 OR assignee = 1 OR assignee = 2) ORDER BY cf[12901] DESC

I cant seem to figure this out.

0

There are 0 answers