Kanban JQL - sort by "X days from date"

Dan Foster April 10, 2024

Hi all,

I am looking to setup a kanban board with a separate swim lane that pulls out issues when they are within X business days from a date.

On the ticket we enter a "estimated delivery date" in a custom date field which is communicated to our client, we'd like to pull tickets into a separate swim lane when that delivery date is approaching.

Any guidance on how I can achieve this with JQL would be greatly appreciated.

1 answer

1 accepted

2 votes
Answer accepted
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.
April 10, 2024

Hello @Dan Foster 

First, can you tell us the type of project with which you are working? You can get that information from the Type column on the View All Projects page under the Projects menu.

If you are working with a Company Managed Software project then in the board configuration you can configure swimlanes to be based on JQL Queries.

https://support.atlassian.com/jira-software-cloud/docs/configure-swimlanes/

How many swimlanes do you want, and what is the specific criteria (number of days out) that you want for each swimlane?

 

If you are working with a Business/Work Management project, a Team Managed project (of any type), or a Service Management project, then creating swimlanes based on JQL is not an available option.

Dan Foster April 10, 2024

Hi @Trudy Claspill thank you for your reply.  I have a kanban board setup in a company managed software project that is referencing tickets from a service management project.

Ideally we'd like to have 2 separate swimlanes, one when the delivery date is within 10 business days or less, another where it's within 5 business days or less

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.
April 10, 2024

In such a board you should be able to configure the swimlanes based on JQL queries.

If your query did not have to consider only "business days" then the queries would look like this:

Delivery date is within 5 business days:

"estimated delivery date" > startofday() and estimated delivery date" <= endofday(5d)

Delivery date is between 5 and 10 business days:

"estimated delivery date" > endofday(5d) and estimated delivery date" <= endofday(10d)

 

Jira does not have a native method in JQL for comparing a date field to a dynamic date calculator (like endofday() ) and make it only consider business days.

 

There are some recommendations for doing such JQL statements and excluding weekends by including startofweek() and endofweek(). This post has some examples which are not identical to your requirement, but you could extrapolate the solution from them:

https://community.atlassian.com/t5/Jira-Software-questions/Exclude-weekends-in-JQL-Query/qaq-p/1030290

 

After reviewing that post if you need more assistance let us know.

Like Bill Sheboy likes this
Dan Foster April 19, 2024

@Trudy Claspill That was the ticket, thank you!

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