Part 1 - Creating a general project report template

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

⚙️ Expand

Steps

  1. Go to Space tools > Content Tools > Templates.

  2. Click Create New Template.

  3. Set the title of the Template to "Project".

  4. Add a Page Properties macro.
    Within 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.

  5. In the "Status" column, add a List Data macro in the second row.
    Set its Field Name parameter to "Status". 

  6. Add three List Option macros within the List Data macro.

  7. For the first List Option macro set the Value parameter to "Open".
    • (Optional) To make List Option macro stylish you can add a Status macro and set its name to "Open" and choose your desired color (Grey is used in this example).

  8. For the second List Option macro set the Value parameter to "In Progress".
    • (Optional) To make List Option macro stylish you can add a Status macro and set its name as "In Progress" and choose your desired color (Yellow is used in this example).

  9. For the third List Option macro set the Value parameter to "Done".
    • (Optional) to make List Option stylish you can add a Status macro and set its name as "Done" and choose your desired color (Green is used in this example).  

  10. In the "Members" column, add a List Data macro in the second row.
    Set its Field Name
     parameter to "Users".
    Check Allow Multiple.

  11. Within the List Data macro, add a User Options macro.
    • (Optional) If you want to select users associated to a specific Group, set User Options macro's groups parameter to your desired Group name (confluence-users group is used in this example).

  12. In the "Team Size" column, add a Report Info macro in the second row, set its Key parameter to "data:Users>size"

  13. In the "Due Date" column, add a Date Data macro in the second row, set its Field Name parameter to "Due Date"

  14. In the "Remaining Time" column, add a Report Evaluation macro in the second row.
    Set its Default Value parameter to "0".
    Set Format parameter to "#.##0.00 Days" and Save.
    To calculate remaining time, nest "(%data:Due Date>milliseconds%-%global:current date>milliseconds%)/(1000*60*60*24)" within Report Evaluation macro.

  15. In the "Number Data" column, add a Number Data macro in the second row.
    Set its Name parameter to "Cost" and Format parameter to "#.##0.00".

Macro structure

⚙️ Expand


approve NEXT: Creating the Enter Project Name button