Skip to content

Instantly share code, notes, and snippets.

@crewshin
Created December 7, 2023 15:36
Show Gist options
  • Save crewshin/961f37048a4f37450d6bfc4b702595dc to your computer and use it in GitHub Desktop.
Save crewshin/961f37048a4f37450d6bfc4b702595dc to your computer and use it in GitHub Desktop.
WeekOf Documentation

This custom JQL function allows you to replace hard coded date ranges like:

created >= 2023-11-19 AND created <= 2023-11-25 order by created DESC

with:

issue in weekOf("1", "created") order by created DESC for last week. This is relative from today (minus 1 week).

or:

issue in weekOf("24", "created", "true") order by created DESC for last week. This is the absolute week number (week 24).

Function signature:

weekOf({*1},{*2},{*3})

*1 This is either the relative (default) or absolute week number. 3 would be 3 weeks back from today. The entire week range. Sunday to Saturday. 7 would be 7 weeks back from today. IF *3 is "true", then this value is absolute. Meaning 23 would be week 23.

*2 This is the date property you want to query. "created", "resolved", "statusCategoryChangedDate", etc.

*3 OPTIONAL (default is false). If omitted or "false", this function searches for relative dates from today. If "true", then this function searches for absolute date ranges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment