Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to do a selection

Thomas N. April 9, 2025

Hi,

how can I search for all my tasks where I am assignee or watcher and which are closed/done in field status?

I want to use this filter on my dashboard.

1 answer

1 accepted

1 vote
Answer accepted
Shalini Pradhan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2025

Hello @Thomas N_ ,

Good day! Welcome to Atlassian community :)

You can use the following JQL query:

(status in (Done) AND (assignee = currentUser() OR watcher = currentUser()))

Thank you!

Thomas N. April 9, 2025

It doesn't work, also not in this way:

status is Done AND assignee = currentUser() OR watcher = currentUser()

Thomas N. April 9, 2025

status = Done AND assignee = currentUser() OR watcher = currentUser()

This should be working!

Thomas N. April 9, 2025

But I still get open tasks with this query.

Dick
Community Champion
April 9, 2025

Dear @Thomas N_ 

The brackets in @Shalini Pradhan 's answer are crucial in finding the correct Jira work items. Please verify her solution by copying it into the filter you're using. 

Kind regards,
Dick

Thomas N. April 9, 2025

Thank you so far!

I still verified in that way:

status = Done AND assignee = currentUser() OR watcher = currentUser()

But I still get my open tasks.

Shalini Pradhan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2025

Hello @Thomas N_ ,

Good day! Please make sure to use all the brackets mentioned in the filter query.
Screenshot 2025-04-09 at 2.48.17 PM.png

Thankyou!

Dick
Community Champion
April 9, 2025

Dear @Thomas N_ 

Please note the differences:

Correct is:    (status in (Done) AND (assignee = currentUser() OR watcher = currentUser()))

FALSE is:       status = Done AND assignee = currentUser() OR watcher = currentUser()

Like Shalini Pradhan likes this
Thomas N. April 9, 2025

I don't find any tasks with this query and all mentioned brackets but I am sure I have.

Dick
Community Champion
April 9, 2025

That would mean that there are no tickets that pass your prerequisites. 
Try watching a ticket, put it in status done and run the query again, you should find that ticket. 

Kind regards,
Dick

Dick
Community Champion
April 9, 2025

The brackets in Shalini's solution influence the order in which the conditions are being processed. 

Venn Diagram.png

Your query is processed like this:   
Select these tickets:  Tickets that are both done and mine, and include all tickets that I watch. This results in area B, E, together with D, E, F, G.

So it spans: B, D, E, F, G.

Shalini's query is processed like this:
Selected tickets should be in A, B, D, E,   AND  inside B, C, E, F, D, G.

So this would span: B, D, E. 

 

Thomas N. April 9, 2025

Thank you!

I've got it!

Thomas N. April 9, 2025


Additional question:

How to build quere to get more status?

(status in (Done) AND (assignee = currentUser() OR watcher = currentUser()))

For example status "Planned" should be added in above query.

Dick
Community Champion
April 9, 2025

Hi @Thomas N_ 

You can use 
(status in (Done, Planned, "Other Status") AND (assignee = currentUser() OR watcher = currentUser()))

 

Kind regards,
Dick

 

Oh, and it's accustomed here to mark an answer as "answered", which makes it easier for people with similar questions to find this answer. Thank you in advance...

Suggest an answer

Log in or Sign up to answer