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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,092
Community Members
 
Community Events
184
Community Groups

JQL search parameters to find date X business days from now

Hello, 
I have a scheduled automation running with a JQL search. I would like to find all tickets that have Custom-Date-Field = X business day from now. My long web search for a solution has not brought me any successful outcome. 

Something like: 
project = XYZ AND "ResponseDate[Date] =now.minusBusinessDays(5) 

The above does not work. Any idea how to type it correctly?

2 answers

1 accepted

2 votes
Answer accepted

I resolved my issue by reducing the efficiency of the JQL search on the in the Scheduled automation trigger, making it run a broader search. Then, I used an advanced field compare, which permits the use of the {{now.minusBusinessDays(5)}} smart value. 

1 vote
Riley Venable (Atlas Bench)
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 03, 2023 • edited

1. Go to the Issue Navigator page in Jira.

2. Click on the 'Advanced' button to open the JQL search window.

3. In the search box, type in the following query: project = XYZ AND "Custom-Date-Field" = startOfWeek(-1d) Note: Replace XYZ with the name of your project and "Custom-Date-Field" with the name of the custom field you are searching for.

4. Edit the "startOfWeek" function in the query to match your requirements. In this example, the function is set to "-1d", which means last business day. You can change the value to the number of business days you want to go back from now. For example, if you want to go back 5 business days from now, you can change "-1d" to "-5d".

5. Click on the 'Search' button to execute the search. This JQL query should return all tickets that have a value of X business day from now in the Custom-Date-Field.

Hello @Riley Venable (Atlas Bench) , 
thank you for having taken the time to respond. 

However, this does not fulfill the intended search. StartOfWeek() function will search X days in reference from the start of the week. If it's a monday, the formula will work, but if it's friday, a startOfWeek(-5d) will be looking back 8 business days, not 5. 

I need the formula to work on any given day of the week.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events