Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Excerpt

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 SQL report that queries JIRA, showing issues grouped per assignee, showing time estimates vs. assignee capacity.

  

The sprint to show is selected in a drop-down . Here we can 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.

...

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

...

...

NOT YET FINISHED

Install the SQL plugin

Install the SQL for Confluence plugin in JIRA. 

Define a Datasource to access JIRA

...

Code Block
languageapplescript
titleconf/server.xml
                     <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
                            username="redradish_jira"
                            password="fsw0823l23rss3cret"
                            driverClassName="org.postgresql.Driver"
                            url="jdbc:postgresql://localhost/redradish_jira"
                            maxActive="20"
                            validationQuery="select 1"/>

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

Sprints drop-down

Create a macro listing all Sprints in JIRA, most recent first:

Image Removed

The contents of this macro can be found on Bitbucket.

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

Image Added

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 ):

Image Added

Define a Param user macro

Our query must be parametrized with When the user 's selection. Do this by creating a 'param' macro that uses $req.getParameter() to fish out the sprint parameter.TODO: link to Velocity definition.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

...