Part 3 - Creating the first component of the product manager dashboard

Overview

Next, let's build the the product manager dashboard.

We'll start with the first component of the product manager dashboard which contains a chart displaying the number of tasks team members have created.

By the end of this section you should have something that looks like this:

Source code

The following source code is shared using Confluence Storage Format - the XHTML-based format that Confluence uses to store the content of pages, page templates, blueprints, blog posts and comments.

For more information on how to use this source code on your Confluence, read the following article - How do I use Recipes that use the Storage Format with the Confluence Source Editor?

<ac:structured-macro ac:macro-id="3f3161e3-9c4a-4bbe-bb17-4f177e3d8991" ac:name="chart" ac:schema-version="1"> <ac:parameter ac:name="dataDisplay">after</ac:parameter> <ac:parameter ac:name="type">bar</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="f0907a97-f086-4fd4-a56c-84441de0387c" ac:name="report-table" ac:schema-version="1"> <ac:parameter ac:name="injected">true</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="0f078eba-e0e2-438e-a86b-e510be82f114" ac:name="grouping-reporter" ac:schema-version="1"> <ac:parameter ac:name="as">Assignee</ac:parameter> <ac:parameter ac:name="">Task>data:User</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="e1d78c94-2ec2-43cd-86a3-a96854f03087" ac:name="grouping-stats" ac:schema-version="1"> <ac:parameter ac:name="as">AssigneeTasks</ac:parameter> <ac:parameter ac:name="">Task>size</ac:parameter> </ac:structured-macro> </p> <ac:structured-macro ac:macro-id="802b6cd8-0ec9-41d6-8dc4-fa9a95cc31d8" ac:name="expanding-reporter" ac:schema-version="1"> <ac:parameter ac:name="as">Task</ac:parameter> <ac:parameter ac:name="">data:Task</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="972328d1-8c83-4a46-843b-5b60caa0cc04" ac:name="local-reporter" ac:schema-version="1"> <ac:parameter ac:name="">page:children</ac:parameter> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="acdc39ff-74bb-4a41-9505-eb45f14ea54b" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="injected">true</ac:parameter> <ac:parameter ac:name="title">Assignee</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="a9ef8cd5-f592-4679-9643-7c71c92d76ee" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">Assignee</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="4d104604-e4cc-4e6e-a95c-25801b158f4f" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Number of Tasks</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="a4f515b2-eae1-4dd7-bd4e-136ed2c02440" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">AssigneeTasks>stats:item count</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro>

Steps

Add a chart macro

On a draft page

  • add a Confluence Chart macro

    • set Type to "bar"

    • set dataDisplay to "after"

Add report-table

Inside the Chart macro

Within the Report Table macro

  • add a Grouping Reporter macro

    • set the Key parameter to "Task>data:User"

    • set the As parameter to "Assignee"

In this Grouping Reporter macro

  • add a Grouping Stats macro

    • set the Key parameter to "Task>size"

    • set the As parameter to "AssigneeTasks" 

  • add an Expanding Reporter macro

    • set the Key parameter to "data:Task"

    • set the As parameter "Task" 

In the Expanding Reporter macro

  • create a Local Reporter macro

    • set the Key parameter to "page:children"

Adding the reporting columns

Within the Report Table macro, (below the Grouping Reporter macro)

  • add two Report Column macros

    • set their Titles to

      • "Assignee"

      • "Number of Tasks"

In the "Assignee" Report Column macro

  • add a Report Info macro

    • set the Key parameter to "Assignee"

In the "Number of Tasks" Report Column macro

  • add a Report Info macro

    • set the Key parameter to "AssigneeTasks>stats:item count"

This is so we can get the value of the Scaffolding Description field.

Macro structure

Next

https://appfire.atlassian.net/wiki/spaces/USECASES/pages/478512707