Overview
The document library holds all the attachments in the project management space. Important documents such as invoices, resumes, quotations can be uploaded to the respective subprojects.
Using Reporting, all the attachments uploaded to any subproject can be reported in one table along with other relevant details.
Suppliers used
content-reporter can be further edited to filter attachments that are listed here, using options such as Space, Label and Scope.
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
This means the Project Members Scaffolding data is stored as an Array List.
This keychain is useful for debugging purposes.
Structure and Content
First, set the main structure of our report, which is a table
create a report-table macro
Next, define what to report by adding a content-reporter block
nest the content-reporter block inside the report-table block
Edit the content-reporter block
type
attachment
in Types
This means Reporting only fetches attachments within this space.
In the content-reporter block
insert a text-sort block
edit the text-sort block
type
content:title
for Keychoose 'ascending' for Order
This sorts the attachments in ascending order based on the attachment file name.
The content supplier or attachment supplier can be used interchangeably here, as the attachment is a form of content.
Now we are ready to setup the report columns.
Attachment Name
Within the report-table block
insert a report-column macro underneath the content-reporter block
name this column File Name
insert a report-info block inside this report-column
edit the report-info block
name the Key
attachment:title
check Link To Item
Reporting fetches the attachment title or file name and provides a link to the attachment.
Page
insert a report-column block
name this column Page or Source
insert a report-info block inside this report-column
Edit the report-info block
name the Key
attachment:attached to
check Link To Item
Reporting fetches the source of this attachment (the page it belongs to) and provides a link to that page.
File Size
insert a report-column block
name this column File Size
insert a report-info block inside this report-column
edit the report-info block
name the Key
attachment:nice file size
nice file size
returns the most suitable metric for file size, compared to file size
which only returns the length in bytes.
Creator
insert a report-column block,
name this column Creator, Owner or Uploaded by
Insert a report-info block inside this report-column
edit the report-info block
name the Key
attachment:creator
This column returns the user that uploaded the attachment.
Additionally, you can opt to check Link To Item to return a link to the user's profile page.
Modification Date
insert a report-column block
name this column Last modified
insert a report-info block inside this report-column
Edit the report-info block
name the Key
attachment:modification date > date: dd MMMM yyyy (hh:mm a)
A keychain is used to format the modification date in the following example: 04 January 2017 (08:27 AM).
No Attachments
insert a report-empty block
enter a message to display when no attachments have been uploaded to the space
This message will appear when the space has no attachments.