I am trying to run a query for activty, when I select "Worked on" feature per person, I am trying to update the JQL query to show only those items within the last 24 hours. I used this:
assignee in (5c98dcd1*****01c20dc37) AND updated = endOfDay(-1) OR reporter in (5c98dcd1*****01c20dc37) OR creator in (5c98dcd1*****01c20dc37) ORDER BY updated DESC
**** just for protecting data, not actually in query
However, the results are not changing. Can someone help me figure out what is wrong with the JQL that I am using?
Hi @Kaitlin Meehan -- Welcome to the Atlassian Community!
Please try updating your query for the updated check to use >= rather than =
... AND updated >= endOfDay(-1) ...
Also, the placement of your OR statements may not be what you are seeking. Are you really looking for things which were reported by a specific person, regardless of update time-frame? If not, please try this:
( assignee in (5c98dcd1*****01c20dc37)
OR reporter in (5c98dcd1*****01c20dc37)
OR creator in (5c98dcd1*****01c20dc37) )
AND updated >= endOfDay(-1)
ORDER BY updated DESC
Thank you so much! So how it has been requested to track activity for my team is tasks we not only created but also listed as a watcher. I believe reporter and creator would be the same thing, but watcher is important because if we made a comment that is not tracked by reporter or creator in activty from my understanding.
I tried the order and with >= as well :
assignee in (5c98dcd167af62601c20dc37) OR reporter in (5c98dcd167af62601c20dc37) OR watcher in (5c98dcd167af62601c20dc37) AND updated >= endOfDay(-1) ORDER BY updated DESC
and I am still getting over 1000+ results, which I know I haven't done that many in a day haha.
Thank you again for your help!
You are missing a set of parenthesis around the user checks. Without those, JQL is assuming something like this;
assignee IN (...) OR reporter IN (...) OR
( watcher IN (...) AND updated... )
What you may want is, noting the bold parenthesis I added:
( assignee IN (...) OR reporter IN (...) OR watcher IN (...) ) AND updated...
If you won't find a solution with JQL, you can try Dynamic Filters: JQL Replacer add-on. It's created by my team to simplify database queries. Here is an example:
1. Set data you need with the help of visual composer.
2. Choose the required date or time:
3. Select the created Smart Fields to display the result:
Hope you find the best option for you.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events