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?
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. 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Riley Venable ,
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.