Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Planning a sprint in JIRA Agile involves assigning issues. You want to spread the load fairly, not overburdening or underburdening workers. To complicate matters, some issues take longer than others (with more Story Points or greater Time Estimate), and the capacity of each worker varies per week, as they may have time off or other responsibilities.

To meet this planning need in a simple way, we have developed the Sprint Capacity Report, a Confluence-based report that queries JIRA, showing issues grouped per assignee, showing time estimates vs. assignee capacity.

The drop-down list selects the Sprint whose issues/assignees are shown. In this example we see, for instance, that Dave is able to work 10 hours this sprint, is assigned one issue (SKP-14), which is estimated to take 30h, so Dave would be at 300% capacity unless we change things. There are 49 hours' worth of unassigned issues.


The report is implemented as a giant parametrized SQL query running within a Confluence page, with the SQL running against the JIRA database.

User capacities are stored as user properties in JIRA. E.g. clicking 'Edit' in the Capacity column for Dave brings up:

Install the SQL plugin

Install the SQL for Confluence plugin. 

Define a Datasource to access JIRA

First we need to allow Confluence access to our JIRA database, via a datasource configured in Confluence's conf/server.xml file.

                     <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
                            validationQuery="select 1"/>

Restart Confluence. Afterwards, a simple query like select count(*) from jiraissue against the JiraDS database should work.

Sprints drop-down

We need to prompt the user for the Sprint they wish to review. 

This drop-down is implemented as a Confluence "user macro". See the JIRA Sprint select-list macro for the implementation. Once implemented, insert the macro in your page, parametrized with the JIRA datasource name ( JiraDS ):

Define a Param user macro

When the user clicks a sprint from the list above, the page reloads with a sprint=xyz parameter, where xyz is the internal Sprint ID. We now need 

Define a SQL wrapper macro

We can't just use the SQL macro here, as we want to embed our Param macro in it. See Allow macro content inside any other macro for a SQL wrapper macro that gets around this.

Query SQL

Create a page in Confluence called Sprint Capacity Planner, with contents:


TODO: clean up and put SQL on bitbucket

  • No labels