Forums

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

How to create a filter to have the tickets that I worked in a specific period of time?

Rodrigo Alves Cricci January 12, 2023

I am trying to filter only the tickets that I work in the week. Current I used this expression: issuekey in issueHistory() AND updated >= startOfWeek(). But the issue here is that, if someone changed something in a old issue that I worked before, it will be here. I tried to add " AND updated = currentLogin()" but returns nothing.

2 answers

1 accepted

1 vote
Answer accepted
Ste Wright
Community Champion
January 12, 2023

Hi @Rodrigo Alves Cricci 

updatedBy() sort of works here - but you can't use dynamic date functions with it, it has to be an absolute date or a number of days, weeks, months, etc.

So you could have:

issuekey IN updatedBy(,"<Username Here>","-7d")

^ Which shows all issues updated by a specific user within the last 7 days.

---

You could add additional JQL functions to it to define it more towards the start of the week, but it might not always be 100% accurate - for example, you could have:

issuekey IN updatedBy(,"<Username Here>","-7d") AND updated >= startOfWeek()

^ But, this query could run on Tuesday (Day 3 in the week), and have been updated by someone other than yourself within that timeframe, whilst you updated it 5 days ago (i.e before the start of the week).

---

See what else you can do with updatedBy() on this help page

Ste

Rodrigo Alves Cricci January 12, 2023

Hi Stephen, it works perfect now thanks. Due this task be something that I will probably do always on Friday or every two weeks, I think only the "updatedBy" is necessary.

Thank you again, help me a lot!!!!

Like Ste Wright likes this
Ste Wright
Community Champion
January 12, 2023

No worries!

If this answer helped, could you accept it? That way, other users who find this question in future know this answer can help them too!

Ste

Like Rodrigo Alves Cricci likes this
0 votes
Rilwan Ahmed
Community Champion
January 12, 2023

Hi @Rodrigo Alves Cricci ,

Welcome to the community !!

"But the issue here is that, if someone changed something in a old issue that I worked before, it will be here" --> This is because as soon as something changes in jira ticket, the updated date gets updated. 

issueHistory() finds issues that you have recently viewed. That may or may not be assigned to you. 

Try filtering the issue with assignee. I don't find any other suitable conditions for you :( 

Example: issuekey in issueHistory() AND updated >= startOfWeek() and assignee = currentUser()

Rodrigo Alves Cricci January 12, 2023

Hi Rilwan, tanks!. 

Sadly I can't do like this because I need the issues that I already worked on. So when I right "assignee = currentUser() I remove the tickets that I already send forward.

But thank you for the help! 

Suggest an answer

Log in or Sign up to answer