Creating the Team Resourcing Page

The team resourcing page lists all the subprojects and shows the list of members involved in each subproject. The most immediate contact person's e-mail address is also shown in the final column.

For this project, 2 user groups are created: pmd-project-leaders and pmd-project-members.

pmd-project-leaders include all the project leaders involved in the project.

pmd-project-members include all the project members involved in the project.

What's in This Guide:

Pro Tip

When to Use the Collection Supplier

Use the object supplier if you are unsure of the object type. Pair any key with an object:class keychain and it will return the type of object, for example:

data:Project Members > object:class returns

class java.util.ArrayList

which means the Project Members Scaffolding data is stored as an Array List.

This keychain is useful for debugging purposes.


Content and Structure

First, create a report-table macro. This will be the main structure of our report, which is a table. 

Next, define what to report using a content-reporter block. Nest this block inside the report-table block.

Edit the content-reporter block, and set Types to +pages, -attachment, Labels to subproject and Scope to Cafe Rockettoria Projects > children.

This means Reporting will only fetch pages labeled as subproject and is a children of Cafe Rockettoria Projects. Note that -attachment means attachments are excluded.

In the content-reporter block, insert a text-sort block. 

Edit the text-sort block and type content:title  for Key.

Next, choose 'ascending' for Order.

This will sort the pages in ascending order based on the page title.

Now we are ready to setup the report columns.

Project Name

Still within the report-table block, insert a report-column macro underneath the content-reporter block (see diagram). 

Name this column Project Name. Insert a report-info block inside this report-column.

Edit the report-info block, name the Key content:title and check Link To Item.

Reporting will fetch the pages title.

Project Status

Insert a report-column macro, name this column Project Status.

Insert a report-info block inside this report-column.

Edit the report-info block, name the Key data:Project Status.

Reporting will fetch the subproject status using the Scaffolding data block we created in the livetemplate.

Project Leader

Insert a report-column macro, name this column Project Leader.

Insert a report-info block inside this report-column.

Edit the report-info block, name the Key data:Project Leader.

Reporting will fetch the subproject's team leader using the Scaffolding data block we created in the livetemplate.

Project Members

Insert a report-column macro, name this column Project Members.

Insert a report-info block inside this report-column.

Edit the report-info block, name the Key data:Project Members and set Seperator to newline.

This way, each team member's name will be displayed in a new line.

Reporting will fetch the subproject's team members using the Scaffolding data block we created in the livetemplate.

Contact

Insert a report-column macro, name this column Contact.

Insert a report-info block inside this report-column.

Edit the report-info block, name the Key data:Project Leader > collection:first  > user:email.

Reporting will fetch the subproject's team leader's email address by pairing it with the user:email keychain.

The Project Leader Scaffolding data block returns a list of users, so the first item in the list is fetched (there is only one project leader in this perspective), and the user's email is returned based on the users profile page.


The Macro Structure


Full Source

Team Resourcing Source
<ac:structured-macro ac:macro-id="38aec1b2-1f0e-4759-8be8-e20dbcf76023" ac:name="report-table" ac:schema-version="1">
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="38314951-78e6-4773-b549-e46d953e2e5e" ac:name="content-reporter" ac:schema-version="1">
      <ac:parameter ac:name="types">+pages, -attachment</ac:parameter>
      <ac:parameter ac:name="scope">Cafe Rockettoria Projects &gt; children</ac:parameter>
      <ac:parameter ac:name="labels">subproject</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="d1e9c74e-605d-4a53-93f3-38d195a200b2" ac:name="text-sort" ac:schema-version="1">
            <ac:parameter ac:name="">content:title</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="aea2847c-88ea-4257-a597-ad46237c0264" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Project Name</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="59a534ec-dac2-4750-a69c-747c111a21ae" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="link">true</ac:parameter>
            <ac:parameter ac:name="">content:title</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="92c73454-6ef4-432a-b915-c55216fd744b" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Project Status</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="304641a2-8b08-4275-80a7-af69a6797359" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="">data:Project Status</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="127bfac6-2465-4955-9001-dbfc3c473366" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Project Leader</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="8077ec40-d18e-486f-942d-1edce5e046df" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="">data:Project Leader</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="bd0ed584-2fee-4988-b3ad-a0b3e4d3c0c8" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Project Members</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="0814da3c-04ce-44f0-a925-e86697b91436" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="separator">newline</ac:parameter>
            <ac:parameter ac:name="">data:Project Members</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="39a74550-b31c-4454-8f5e-aea4d03da68a" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Contact</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="7632605f-305b-4ba5-9010-bdaa40849858" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="">data:Project Leader &gt; collection:first  &gt; user:email</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>