Contributors Summary Macro

The Contributors Summary macro displays a table of contribution-based statistics for a set of pages. These statistics can be grouped according to individual pages or individual contributors.

The default scope for this macro is an individual page, but this can be extended to include the immediate children or descendants of a specified page. The statistics cover the following types of contributions:

  • edits to the page(s)
  • comments added to the page(s)
  • labels added to the page(s)
  • people watching the page(s)

A simple example of the Contributors Summary macro is shown in the screenshot below. It lists statistics for the number of times each contributor has edited, added comments and added labels to this page.

Screenshot: Example Contributors Summary table of statistics

In this example, all default parameter settings are used. For more information about this macro's parameters, refer to the Parameters section below.

Using the Contributors Summary Macro

To add the Contributors Summary macro to a page:

  1. In the Confluence editor, choose Insert > Other Macros
  2. Find and select the required macro

Speeding up macro entry with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Autocomplete for links, files, macros and mentions.

To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.

Parameters

Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example).

Parameter

Default

Description

Group By
(groupby

contributors

Specifies the basis for grouping contribution-based statistics:

  • contributors — group by the people who have contributed
  • pages — group by the pages used to find contributors.

Columns to Display
(columns

edits,comments,labels

Sets the columns that should appear in the table. The statistics or type of information presented depends on the basis for grouping set with the Group By parameter. Statistics may be calculated for:

  • edits — the number of times each contributor has edited the page(s) or the number of edits made to each page.
  • edited — a list of the pages edited by each contributor or a list of contributors who have edited each page.
  • comments — the number of times each contributor has added comments to the page(s) or the number of comments on each page.
  • commented — a list of pages to which each contributor has added comments or a list of contributors who have commented on each page.
  • labels — the number of times each contributor has added labels to the page(s) or the number of labels on each page.
  • labeled — a list of pages to which each contributor has added labels or a list of contributors who have added a label to each page.
  • labellist — a list of labels either added by each contributor or on each page.
  • watches — the number of pages being watched by each contributor/person or the number of contributors/people watching each page.
  • watching — a list of pages being watched by each contributor/person or a list of contributors/people watching each page.
  • lastupdate — the last time each contributor made an update or when each page was last updated. Valid updates can include edit, comment or label modifications to a page.

    One or more columns can be used.

Sort By
(order

edits

Sets the criterion used for sorting items in the table. The items sorted depend on the basis for grouping set with the Group By parameter. Sort criteria are:

  • edits — sorts items in the table based on the total number of edits made, either by a contributor or to a page.
  • name — sorts items in the table in alphabetical order, either by contributor or page name.
  • editTime — sorts items in the table based on when the contributor last edited a page (or a specified set of pages) or when the page was lasted edited.
  • update — sorts items in the table based on when the contributor last made any contribution to a page (or a specified set of pages) or when the page last had any contribution made to it.

Reverse Sort
(reverse

false

Reverses the sort order of items in the table, as specified using the Sort By parameter. (Used only in conjunction with the Sort By parameter.)

Maximum Number of Items
(limit

no limit

Limits the number of contributors or pages in the table to the value specified. If no number is specified, all items are included.

Show Anonymous Contributions?
(showAnonymous

false

Includes individuals who have made anonymous contributions to a page.

Show Zero Counts?
(showZeroCounts

false

Sets whether contributors or pages are included for which a calculated statistic is zero.

Page Name
(page

current

Sets the page for which to calculate the contribution-based statistics. If no values for Page Name and Space(s) are specified, the current page is assumed.

Label(s)
(labels

none

Restricts the contribution-based statistics to the specified labels only. You can specify one or more labels, separated by commas.

Space(s)
(spaces

current

Specifies the space key of the Confluence space which contains the specified page name or alternatively, specifies a scope of spaces to search. Space keys are case-sensitive.

This parameter also takes special values, including:

  • @global — All site spaces.
  • @personal — All personal spaces.
  • @all — All spaces in your Confluence site.

You can specify one or more space keys or special values, separated by commas.

If no Page Name and Label(s) are specified, all pages from the specified set of spaces are included.

Content Type
(contentType

both pages and blog posts

Restricts page types to either pages (pages) or blog posts (blogposts). If no value is specified in the Macro Browser, both pages and blog posts are included.

Available values pages and blogposts.

Blog Post Date
(publishDate

none

Specifies the publish date for a blog post. The date format required is: YYYY/MM/DD.

Include Page Hierarchy
(scope

specified page only

Includes either the immediate children or all descendants of the specified page. If no value is indicated in the Macro Browser, only the specified page is included.

Code examples

The following examples are provided for advanced users who want to inspect or edit the underlying markup for a Confluence page. 

Macro name: contributors-summary

Macro body: None.

Storage format example

This example specifies a content type of blog posts:

<ac:structured-macro ac:name="contributors-summary">
  <ac:parameter ac:name="limit">10</ac:parameter>
  <ac:parameter ac:name="spaces">
    <ri:space ri:space-key="ds"/>
    <ri:space ri:space-key="@personal"/>
  </ac:parameter>
  <ac:parameter ac:name="reverse">true</ac:parameter>
  <ac:parameter ac:name="showAnonymous">true</ac:parameter>
  <ac:parameter ac:name="order">update</ac:parameter>
  <ac:parameter ac:name="labels">chocolate,cake</ac:parameter>
  <ac:parameter ac:name="columns">edits,comments,labels,lastupdate</ac:parameter>
  <ac:parameter ac:name="groupby">pages</ac:parameter>
  <ac:parameter ac:name="contentType">blogposts</ac:parameter>
  <ac:parameter ac:name="showZeroCounts">true</ac:parameter>
  <ac:parameter ac:name="publishDate">2012/06/07</ac:parameter>
</ac:structured-macro>

This example specifies a content type of pages:

<ac:structured-macro ac:name="contributors-summary">
  <ac:parameter ac:name="limit">10</ac:parameter>
  <ac:parameter ac:name="spaces">
    <ri:space ri:space-key="ds"/>
    <ri:space ri:space-key="@personal"/>
  </ac:parameter>
  <ac:parameter ac:name="reverse">true</ac:parameter>
  <ac:parameter ac:name="showAnonymous">true</ac:parameter>
  <ac:parameter ac:name="scope">descendants</ac:parameter>
  <ac:parameter ac:name="order">update</ac:parameter>
  <ac:parameter ac:name="page">
    <ac:link>
      <ri:page ri:content-title="Advanced Topics" ri:space-key="ds"/>
    </ac:link>
  </ac:parameter>
  <ac:parameter ac:name="labels">chocolate,cake</ac:parameter>
  <ac:parameter ac:name="columns">edits,comments,labels,lastupdate</ac:parameter>
  <ac:parameter ac:name="groupby">pages</ac:parameter>
  <ac:parameter ac:name="contentType">pages</ac:parameter>
  <ac:parameter ac:name="showZeroCounts">true</ac:parameter>
</ac:structured-macro>

Wiki markup example

This example specifies a content type of blog posts:

{contributors-summary:limit=10|spaces=ds,@personal|reverse=true|showAnonymous=true|order=update|labels=chocolate,cake|columns=edits,comments,labels,lastupdate|groupby=pages|contentType=blogposts|showZeroCounts=true|publishDate=2012/06/07}

This example specifies a content type of pages:

{contributors-summary:limit=10|spaces=ds,@personal|reverse=true|showAnonymous=true|scope=descendants|order=update|page=ds:Advanced Topics|labels=chocolate,cake|columns=edits,comments,labels,lastupdate|groupby=pages|contentType=pages|showZeroCounts=true}

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport