Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Conflict in query related to search of issues with empty time logs Edited

Hey there!

I have following query, which should return issues, what has no time logged by current user for previous month:

assignee in (currentUser()) AND (worklogAuthor != currentUser() or timespent is EMPTY) AND project not in ("project1", "project2", "project3") and created >= startOfMonth(-1) AND created <= endOfMonth(-1)

Currently, it returns issues that has time logged by a current user.

I tried to consolidate condition worklogAuthor != currentUser() or timespent is EMPTY via AND operator, but in this case I got nothing.

Seems like, it returns issues that that has logged time, because issues has time logged not only by current user. I made this conclusion, since all four issues, what query returns to me, has time logged by me as current user and another user:

 Untitled.png

1 answer

1 accepted

1 vote
Answer accepted

Hi @Vlad Olekhnovich  -- Welcome to the Atlassian Community!

Please try to substitute that clause with this:

(worklogAuthor != currentUser() AND timespent IS NOT EMPTY) OR (timespent IS EMPTY) )

This will separate the two things you are checking for:

  • Time was spent by someone other than the current user, or
  • No time was spent


Best regards,

Bill

Thanks for warm welcoming and your answer, Bill!

Your proposal is reasonable, but main idea of the filter is to receive issues that was assigned to a current user (or still assigned, but were resolved or done) and has no time logged by him/her

Sorry, if my description confused you🙌

Hi!  I thought that was what I was suggesting, so here is a more complete example for one specific project.  Please add/adjust any additional criteria that you need.

project = myProject
AND ( assignee = currentUser()
OR assignee WAS currentUser() )
AND ( timespent IS EMPTY
OR ( timespent IS NOT EMPTY AND worklogAuthor != currentUser() ) )

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Events near you