Part 1 - Creating a general project report template

Overview

We'll start by creating a space template with a page layout for creating a project report. The purpose of this template is so we will have a general layout which can easily be changed and updated in the future.

By the end of this section your template should look something like below.

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="c07533c2-e2e9-4257-ad74-e390af61198c" ac:name="details" ac:schema-version="1"> <ac:rich-text-body> <table class="wrapped"> <colgroup> <col/> <col/> </colgroup> <tbody> <tr> <th>Status</th> <td> <div class="content-wrapper"> <ac:structured-macro ac:macro-id="1519b390-a6c9-43d1-96fe-0453f18416ee" ac:name="list-data" ac:schema-version="1"> <ac:parameter ac:name="name">Status</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="d998a7dc-1797-45e0-9098-454e1bc3b600" ac:name="list-option" ac:schema-version="1"> <ac:parameter ac:name="value">Open</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="1edbeebe-ea42-4546-8d38-1f1bc2fc4bf8" ac:name="status" ac:schema-version="1"> <ac:parameter ac:name="title">Open</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="b50d1bbe-c0e4-4b17-bc36-ba93d772f0e9" ac:name="list-option" ac:schema-version="1"> <ac:parameter ac:name="value">In Progress</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="eb3117a8-54d4-4770-b893-42e20732248f" ac:name="status" ac:schema-version="1"> <ac:parameter ac:name="colour">Yellow</ac:parameter> <ac:parameter ac:name="title">In progress</ac:parameter> <ac:parameter ac:name=""/> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="5ccce22b-a264-454e-a2ac-5f76c3bbbfa8" ac:name="list-option" ac:schema-version="1"> <ac:parameter ac:name="value">Resolved</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="7d70cc7c-cceb-4620-9d23-d293ef611d22" ac:name="status" ac:schema-version="1"> <ac:parameter ac:name="colour">Green</ac:parameter> <ac:parameter ac:name="title">resolved</ac:parameter> <ac:parameter ac:name=""/> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> </div> </td> </tr> <tr> <th>Members</th> <td> <div class="content-wrapper"> <ac:structured-macro ac:macro-id="11c8ce96-7352-4e7b-adfd-9f2a12c55b35" ac:name="list-data" ac:schema-version="1"> <ac:parameter ac:name="multiple">true</ac:parameter> <ac:parameter ac:name="name">Users</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="2aaa485c-b9b0-46d4-ae96-2bca2ce975dc" ac:name="user-options" ac:schema-version="1"> <ac:parameter ac:name="groups">confluence-users</ac:parameter> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> </div> </td> </tr> <tr> <th colspan="1">Team Size</th> <td colspan="1"> <div class="content-wrapper"> <p> <ac:structured-macro ac:macro-id="33b55fb3-0862-459c-9d24-3fcbe5ad9e54" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">data:Users&gt;size</ac:parameter> </ac:structured-macro> </p> </div> </td> </tr> <tr> <th colspan="1">Due Date</th> <td colspan="1"> <div class="content-wrapper"> <ac:structured-macro ac:macro-id="d0738b34-2a94-417f-8773-d5a93f48235b" ac:name="date-data" ac:schema-version="1"> <ac:parameter ac:name="format">dd-MMM-yyyy</ac:parameter> <ac:parameter ac:name="name">Due Date</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> </ac:structured-macro> </div> </td> </tr> <tr> <th colspan="1">Remaining Time</th> <td colspan="1"> <div class="content-wrapper"> <ac:structured-macro ac:macro-id="4f1abd0e-7efd-4d51-bef5-626d819a8b9b" ac:name="report-eval" ac:schema-version="1"> <ac:parameter ac:name="default">0</ac:parameter> <ac:parameter ac:name="format">#,##0.00 Days</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:plain-text-body><![CDATA[(%data:Due Date>milliseconds%-%global:current date>milliseconds%)/(1000*60*60*24)]]></ac:plain-text-body> </ac:structured-macro> </div> </td> </tr> <tr> <th>Cost</th> <td> <div class="content-wrapper"> <ac:structured-macro ac:macro-id="92f41784-4ce3-4a9b-be45-a4107167aa18" ac:name="number-data" ac:schema-version="1"> <ac:parameter ac:name="format">$ #.##0.00</ac:parameter> <ac:parameter ac:name="name">Cost</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> </ac:structured-macro> </div> </td> </tr> </tbody> </table> </ac:rich-text-body> </ac:structured-macro>



Steps

In your space

  • go to Space tools > Content Tools > Templates

  • choose Create New Template

  • set the title of the template to "Project"

  • add a Page Properties macro

In the Page Properties macro

  • add a 2x6 table

    • in the first column, type in "Status", "Members", "Team Size, "Due Date", "Remaining Time" and "Cost" respectively for each cell

In the "Status" column

  • add a List Data macro in the second row

    • set Field Name parameter to "Status" 

In the List Data macro

  • add three List Option macros

  • for the first List Option macro

    • set the Value parameter to "Open"

To make List Option macro stylish , add a Status macro and set its name to "Open" and choose your desired color (grey is used in this example).

  • for the second List Option macro

    • set the Value parameter to "In Progress"

To make List Option macro stylish, add a Status macro and set its name as "In Progress" and choose your desired color (yellow is used in this example).

  • for the third List Option macro

    • set the Value parameter to "Done"

In the "Members" column

  • add a List Data macro in the second row

    • set Field Name parameter to "Users"

    • check Allow Multiple

Within the List Data macro

In the "Team Size" column

  • add a Report Info macro in the second row

    • set Key parameter to "data:Users>size"

In the "Due Date" column

  • add a Date Data macro in the second row

    • set Field Name parameter to "Due Date".

In the "Remaining Time" column

  • add a Report Evaluation macro in the second row

    • set Default Value parameter to "0"

    • set Format parameter to "#.##0.00 Days"

  • Save

In the "Number Data" column

  • add a Number Data macro in the second row

    • set Name parameter to "Cost"

    • set Format parameter to "#.##0.00"

Macro structure

Next

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