Forums

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

Filter to get items updated during the week, where week starts on Thursday and end on Wednesday

Andrii Karazhov September 26, 2023

It is easy to create a filter when using a fixed date for the duration operator:

project = "Project A" AND (assignee was in (user1, user2, user3) during (2023-09-21, 2023-09-27)) 

 here, the start date belongs to CW38, while the end date is CW39.

 

This filter works fine but for every new week, we will need to create a new filter with hardcoded dates. How to implement a universal filter that will always give actual information from Thursday to Wednesday?

Example 1: if the filter is executed on Tuesday it shows all issues from Thursday previous week till Wednesday this week.

Example 2: if the filter is executed on Friday it shows all issues from Thursday this week till Wednesday next week.

1 answer

0 votes
Mohamed Adel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2023

Hi @Andrii Karazhov 

Can you try this instead and check if it solve your problem 

DURING (startOfWeek(),startOfWeek(1))

this should be a dynamic filter to get the data during the current week 

Thanks 

Mohamed 

Andrii Karazhov September 26, 2023

@Mohamed Adel, how does it specify Thursday and Wednesday days of week ?

Mohamed Adel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2023

@Andrii Karazhov  the query I provided will get data from Monday--> Friday

you can get from Thursday and Wednesday using DURING (startOfWeek(3d),endOfWeek(5d)) and you can play with the number of days to get the right data 

Andrii Karazhov September 26, 2023

@Mohamed Adel, it is still not clear, functions startOfWeek and endOfWeek makes a calculation based on the current week, so the filter will give different results if executed on Friday or Monday.

Mohamed Adel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2023

@Andrii Karazhov  
startOfWeek(3d) = Thursday
endOfWeek(5d) = Wednesday 

This will give you the desired data please try it and test the result 

Thanks

Andrii Karazhov September 26, 2023

@Mohamed Adelit doesn't work as expected. Filter with hardcoded dates returns 23 items, while usage of these functions return 1 result

Mohamed Adel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2023

Try that one please  startOfWeek(-4d), startOfWeek(3d)

Andrii Karazhov September 26, 2023

@Mohamed Adelwith this change the filter covers Example 1 but not Example 2. Is there a way to cover both in a single filter ?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events