You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I am looking to create a query that pulls reports for only weekends (Saturday and Sunday) for the entire year.
Please advise if this is possible or for any alternatives.
Hi @Erica Escobar,
This is a late response to discuss an alternate solution:
The JQL for getting the ‘past weekend issues’, for example, created in the past weekend, is
(createdDate >= startOfWeek(-1d) AND createdDate < startOfWeek(1d)) order by createdDate ASC
The startOfWeek() can be use repeatedly to get previous weeks as well. Here is an example for the past 4 weekends:
(createdDate >= startOfWeek(-1d) AND createdDate < startOfWeek(1d) )
OR (createdDate >= startOfWeek(-8d) AND createdDate < startOfWeek(-6d))
OR (createdDate >= startOfWeek(-15d) AND createdDate < startOfWeek(-13d))
OR (createdDate >= startOfWeek(-22d) AND createdDate < startOfWeek(-20d))
ORDER BY createdDate ASC
Because all the data are historical, we can utilize JQL to get the past weekend data, once a week, in a scheduled job. The data for each weekend can be inserted into a database table or concatenated into a data store, which you can use to run the reports.
To populate the previous weeks' data, we can use the example JQL above with OR clauses, or run them in separate queries, one for each weekend.
The previous comment on using a custom script field in ScriptRunner will work seamlessly with reports by adding a new custom field that marks an issue as a ‘weekend issue' and then utilizing it in a filter.
Hope the new information helps.
Welcome to the community!
What kind of query are you thinking about? A query listing all Jira issues created (or resolved?) during the weekend?
On Jira Server/DC I would be using a Script Field (ScriptRunner App), but I'm not sure how to do it on Jira Cloud.