pnovotnak
pnovotnak

Reputation: 4591

Jira query language for excluding issues based on current date

I'd like to exclude issues who have a given status based on the current date, but can't figure out how to do it with startOfWeek() now() etc. Because those must filter on an issue field.

Eg:

AND NOT (status IN ("In review") AND now() BETWEEN (startOfWeek(-2), startOfWeek(1)))

Is there a trick that I can use to get the current time from an issue field? Eg some issue field that is aliased to now()?

Upvotes: 1

Views: 842

Answers (2)

amuratova
amuratova

Reputation: 451

You most probably need changed operator. This will filter out all the issues with status In Review that were changed:

status in ("In review") AND status changed DURING (startOfWeek(-2), startOfWeek(1))

Upvotes: 1

Lennart Steinke
Lennart Steinke

Reputation: 614

You could use updateDate if you want to check for the issues that have been updated in that time period and are in the given status.

If you want to check for the date of the transition into this status, this is a bit more involved. Could you elaborate what you actually need to have happened in this time period for the issues to qualify if updatedDate doesn't do the trick?

Upvotes: 0

Related Questions