Advanced search with multiple users in a specific date range

Dae April 16, 2024

Hello, I have problems finding tickets created on a specific date by users and I have tried different ranges and it goes wrong, one by one of users if it filters correctly but not with all of them, the problem is that I do not have a "Group" as such assigned I can only search by users, any recommendations on how to do it?

created > startOfMonth() AND created < endOfMonth() AND agent = A_001 OR agent = A_002 OR agent = A_003 ORDER BY created DESC

Also tested with startOfWeek() AND created < endOfWeek()

OR >= -1w (WITH all the users)

In all of them they return tickets from the entire year, but the same filter with only ONE user like: 

created > startOfMonth() AND created < endOfMonth() AND agent = A_002 ORDER BY created DESC: 

does give me exact data. I don't know how to search for it for everyone at the same time.

2 answers

2 accepted

1 vote
Answer accepted
Dae April 16, 2024

solved using and (agent = 1 OR ....)

0 votes
Answer accepted
Valeriia_Havrylenko_SaaSJet
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 16, 2024

Hi @Daeliz M and welcome to the community!

For example, this would get you everything from the start of week to this Friday:

created >= startOfWeek() and created < startofWeek(6d) and projectsWhereUserHasRole() and assignee = currentUser() assignee = currentUser()

and 

I

ssues where user has a specific role: projectsWhereUserHasRole()

Issues assigned to current user: assignee = currentUser()

 

Valeriia_Havrylenko_SaaSJet
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 16, 2024

@Daeliz M Please accept my answer if you find it useful 

Thanks!

Like Dae likes this
Dae April 16, 2024

Hi @Valeriia_Havrylenko_SaaSJet thanks <3

I can search by project, but not by assigned since my users create tickets that are assigned to others, not to them, they only create and in the project/ticket they only show as creator/reporter so it doesn't give me results 

Valeriia_Havrylenko_SaaSJet
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 16, 2024

@Daeliz M i think you can try this

status changed BY currentUser() OR reporter = currentUser() 
OR watcher in (currentUser()) OR assignee = currentUser() 
OR assignee was currentUser() OR commentedByUser = currentUser() 
ORDER BY updated DESC

But maybe i can help better if you explain for what you need that. 

Hope my answer was helpful! 

Like Dae likes this
Dae April 16, 2024

Thank you very much
I needed to export the number of tickets of the month from my team crew that pass to other teams but it is already fixed. Thanks for the help.

Valeriia_Havrylenko_SaaSJet
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 16, 2024

@Daeliz M 
Glad to hear it worked out!

Suggest an answer

Log in or Sign up to answer