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?
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"
To make List Option stylish, add a Status macro and set its name as "Done" and choose your desired color (green is used in this example).
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
add a User Options macro
If you want to select users associated to a specific Group, set User Options macro groups parameter to your desired Group name (confluence-users group is used in this example).
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
To calculate remaining time
nest "
(%data:Due Date>milliseconds%-%global:current date>milliseconds%)/(1000*60*60*24)" within Report Evaluation macro
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