Dashboard > Atlassian Plugins > ... > Macros > collection-filter
  Atlassian Plugins Log In | Sign Up   View a printable version of the current page.  
  collection-filter

Added by David Peterson , last edited by David Peterson on Mar 08, 2008  (view change)
Labels: 

{collection-filter}

Plugin: Reporting Plugin, from version 2.0.0

Checks that any contained filter values exist on all/any/none of the items in the collection specified by the filter's "prefix:key" value.

Usage

{collection-filter:prefix:key|matchItems=all/any/none|matchFilters=all/any/none}
  {xxx-filter:prefix:key}
  {yyy-filter:prefix:key}
{collection-filter}

Parameters

Name Required Default Description
_[default])/key
The key value to filter on.
matchItems
all
Define how many of the collection's items can match the sub-filers. May be one of the following:
  • all - (default) All items must match the sub-filter set.
  • any - At least one item must match the sub-filter set.
  • none - None of the items may match the sub-filter set.
matchFilters
all
Define how many of the sub-filters must match for the item to be let through. May be one of the following:
  • all - (default) All sub-filters must match the item.
  • any - At least one sub-filter must match the item.
  • none - None of the sub-filters may match item.

Nesting Collection Filters

You can use '{collection-filter-1}' to '{collection-filter-5}' if you need to nest collection filters.

Examples

Filter on page children

Display Pages with at least one child who's title starts with 'Foo'

{report-list}

{local-reporter:content:children}
  {text-sort:content:title}
  {collection-filter:content:children|matchItems=any}
    {text-filter:content:title|include=Foo.*}
  {collection-filter}
{local-reporter}

{report-body}{report-info:content:title|link=true}{report-body}

{report-list}

Filter on Scaffolding data

Display Pages who have a Scaffolding table-data section which contains a row who's Number field value is between 1 and 5.

{local-reporter:content:children}
  {text-sort:content:title}
  {collection-filter:data:Table|matchItems=any}
    {number-filter:data:Number|minValue=1|maxValue=5}
  {collection-filter}
{local-reporter}

See Also

Copyright(c) CustomWare Asia Pacific Pty Ltd
Powered by Atlassian Confluence 2.7.3, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators