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

How do I create a filter that displays issues created X# of business days in the past

Dave Stillwell September 1, 2023

I am trying to create an automation rule that is scheduled to run every day an add a comment to issues that ware created 10 business days ago. This does not seem to be possible using a JQL filter (I can get it to work with calendars days using StartofDay).  I see that you can use smart values in a conditional filter, so I am trying {{issue.created.jqldate}} less than {{now.toBusinessDayBackwards(4)}}.  This results in no action perform even though I know I have issues that meet the criteria.  So is my conditional filter correct or what I trying to do even achievable?

2 answers

2 votes
Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 1, 2023

Can you try a filter like this?

 

Screen Shot 2023-09-01 at 4.55.47 PM.png

Dave Stillwell September 7, 2023

I believe that filter would result in all issues created more than 10 Business days ago.  My conundrum is in answer to @Trudy Claspill I am looking to filter for issues created exactly 10 business days ago.  I think the roadblock is {{now}} may have a time component, so I assume that unless an issue was created the same time 10 days ago, the filter will never supply results.  

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 1, 2023

Are you trying to add the comment to only the issue created exactly 10 days ago, or to all issues created 10 or more days ago?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2023

You could use two conditions

{{issue.created}} > startOfDay(-10) and {{issue.created}} < startOfDay(-9) 

Dave Stillwell September 7, 2023

That is what my filter is set to right now but unfortunately, that only works with calendar days.  It doesn't work for business days.

I wonder if what I am trying to do is possible with 2 advanced compare conditions?  I guess I can try it and see if it can get that to work building on @Kian Stack Mumo Systems suggestion.

Dave Stillwell September 7, 2023

@Trudy Claspill and @Kian Stack Mumo Systems 

Seems I was able to get this solved by using 2 advanced compare filters 

{{now.diff(issue.created).businessdays}} > -11

{{now.diff(issue.created).businessdays}} < -9

 

Thank you both for your help. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events