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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

display sprint status as Ongoing/Not-started/Finished

I have my confluence table as below. How do I get to display the sprint's status as Ongoing/Not-started/Finished ? What kind of Jira query that I could use here?


8 answers

Try this SQL query:

SELECT T1.'Sprint', T1.'Start Date', T1.'End Date',
T1.'To Do'->split(" ")->0 AS 'To Do',
T1.'In Progress'->split(" ")->0 AS 'In Progress',
CAST((T1.'To Do'->split(" ")->0) AS INT) + CAST((T1.'In Progress'->split(" ")->0) AS INT) AS 'Total',
WHEN DATEDIFF(day, 'Start Date', "today") < 0 AND DATEDIFF(day, 'End Date', "today") < 0
THEN FORMATWIKI("{status:colour=Green|title=Not started}")
WHEN DATEDIFF(day, 'Start Date', "today") >= 0 AND DATEDIFF(day, 'End Date', "today") <= 0
THEN FORMATWIKI("{status:colour=Yellow|title=Ongoing}")
ELSE FORMATWIKI("{status:colour=Grey|title=Finished}")
END AS 'Status'

Thu 5-3.png

You may need to adjust you column names to your original table (this is a test table, not all the column are present).

And set the corresponding date format in the Table Transformer macro settings (mm/dd/yy for this example).

Seems that the conditions work fine (try to check more, but at least you've got an idea how some dates may be compared).

Hi @emagnun ,

I can suggest trying to set statuses with the help of the Table Transformer macro.

I guess that this is your table from our previous thread - I suggest leaving the current Table Transformer macro as it is (we already have a rather complex SQL query there with splitting and format changing). So, not to mess anything up wrap the second Table Transformer on the top of the first one (so you'll be working with a result simple table with numbers).

Then you can modify this example to set statuses based on the number of your issues. For example, if To Do and In Progress both are 0, and Done is not, then your sprint is completed.

Maybe this idea could help.

Hi there,

As this thread mentions our Table Filter and Charts for Confluence app, we are happy to introduce its new macro – Table Spreadsheet.

The macro allows you to work with fully functional Excel spreadsheets right in Confluence.

You’ll be able to use cells’ formulas, filters, conditional formatting, etc., create pivot tables and charts from the page view and edit mode.

The Table Spreadsheet macro is available for Cloud and Server/Data Center.

This format option looks really cool. Thanks for help.

Below query helped me to workaround. Not sure if this is the best way.

WHEN (DATEDIFF(DAY, GETDATE(),T1.'Start Date')>0) THEN "Not-started"
WHEN ((DATEDIFF(DAY, GETDATE(),T1.'Start Date')<0) AND (DATEDIFF(DAY, GETDATE(),T1.'End Date')>0)) THEN "Ongoing"
ELSE "Finished"

@Katerina Kovriga _Stiltsoft_ Thanks for input. I have added a start date and end date columns in my table now.


Is there a way to check today's date against these columns in the below table transformer and then display the status of sprint as not-started/ongoing/finished?



Thanks @Sebastian Krzewiński .

I have just listed all my sprints one by one in the table. I just want to pass the sprint-name and then get the status of that sprint in the second column. (You can see i'm getting the issue count on other columns by passing the sprint-name)

If you have a suggestion as to how to write such a query, it would help me a lot. Meanwhile I'm going through the links you provided to see if that works out.  

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events