Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel3
minLevel2
absoluteUrltrue
excludeSee also
typeflat
separatorpipe

Overview

The metadata-matches macro totals up the number of matching pages which have a particular value for metadata. This result can be shown directly or can be used as input to another statistics macro.

In addition, this macro allows for another metadata value to be calculated for each matching page. If another metadata value name is specified the macro will display a calculation based on the values of this metadata on the matching pages rather than the count of the number of occurrences.

Parameters

Parameter

Required

Default

Notes

Version

first parameter

(tick)


The metadata value name whose values will be matched. This can include added metadata and internal metadata.

The value of the metadata to be matched is added to the macro placeholder (macro body).

If a value-name is NOT specified for a calculation in the value-name field, then the macro will return a count of the number of occurrences of this first parameter metadata valuespecified in the body of the macro placeholder.


function


sum

If a value-name is specified for a calculation, then the macro will use the specified function on the values taken from the matching pages and display the calculated value of this function.

  • sum - returns the sum of each non-empty value (default)

  • average - returns the average of each non-empty value

  • maximum - returns the minimum of each non-empty value

  • minimum - returns the maximum of each non-empty value

(info) The metadata value that is compared includesany wiki markup characters used for the value.


key

current space

Limits the content returned to be within the space with the given key.

root


current page (@self)

Use @self for the current page (the default), @parent for the parent page, or the name of any page, e.g MySpace:MyPage.

If this is specified and the pages option is not, then the report will run over only the pages listed here.


label



lImits the content to that with the specified label or labels. A comma separated list produces ANY pages that match.


type



Specifies which Confluence content types should be considered for a report.

(info) This feature is based on the Confluence contentbylabel macro which has the same attribute.


value-name


sum

Second metadata value that can be used to generate a calculation - the default is sum. However it can also apply the same functions as used in the metadata-calculate macro.


...

Another example of use of the metadata-matches macro is to add multiple versions of the macro to populate a table, creating a dashboard of information from a group of pages

Multiple versions of the metadata-matches macro can also be added to the Confluence chart macro to visualise and present the collated data from each report.

Reference Markup

Code Block
languagetext
{metadata-matches:Current Lifecycle status}|Active|{metadata-matches}

...