How to simplify this JQL query to find recently completed tasks by a set of users?

Qi Luk June 30, 2017

How to simplify this JQL query to find recently completed tasks by a set of users?

 

project in (PROJECT1, PROJECT2) AND status in (Resolved, Closed, Fixed) AND assignee was in (user1, user2) after startOfWeek(-7d) AND status changed after startOfWeek(-7d) AND (((status changed to Resolved by user1) OR (status changed to Closed by user1) OR (status changed to Fixed by user1)) OR ((status changed to Resolved by user2) OR (status changed to Closed by user2) OR (status changed to Fixed by user2))) ORDER BY updatedDate DESC, priority DESC

1 answer

0 votes
Rachel Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 30, 2017

Hi Qi, can you use the presence of a resolution in your check rather than a list of statuses?  Also, can you create a group for your list of users?

Try something like this:

project in (PROJECT1, PROJECT2) AND resolutiondate > startOfWeek(-7d) and resolution changed by membersOf("your-group-name-here") and resolution is not EMPTY ORDER BY updatedDate DESC, priority DESC

Hope this helps,

Rachel Wright

Qi Luk June 30, 2017

 

In my real application I need to expand (Resolved, Closed, Fixed) to (Resolved, Closed, Fixed, CUSTOM_STATUS1) and include into the condition (status changed to CUSTOM_STATUS1 by user1)

The "CUSTOM_STATUS" is an unresolved intermediate state, so your solution won't work.

Suggest an answer

Log in or Sign up to answer