Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
titleParameters
intro-textThe macro is configured by the following parameters.


Section
titleDoctype(s)


Transclusion
taget-heading-level*
documentDisplay Table Macro
idsDoctype(s)




Transclusion
taget-heading-level*
documentDisplay Table Macro
idsSpace Keys



Transclusion
taget-heading-level*
documentDisplay Table Macro
idsWhere



Section
titleSort By


Transclusion
taget-heading-level*
documentSort By Property
idsSort By




Section
titleIdentifier

Unique identifier of the rendered content.


Transclusion
taget-heading-level*
documentDisplay Table Macro
idsExclude Self




Transclusion
taget-heading-level*
documentDisplay Table Macro
idsRestrict to immediate Children


Section
titleRender individual Results

If checked there is a data attribute added to the rendered element for each line result.

If not checked only the data attributes provided by default are added.

Data Attribute
Description
data-projectdoc-result-countProvided by DefaultThe size of the result set. Note that the count of formulas may be smaller than this number if documents in that set do not provide all values required for the Line Document Formula.
data-projectdoc-result-...-NRequires value of trueThe infix for this attribute name (...) is derived from the name of the formula that created it.  The 1-based index of the document that provided the values for it.
data-projectdoc-finalresult-...Provided by DefaultThe final result of the formula with a derived name of the formula is used as a suffix.

If no Document Formula is specified, then no individual results will be calculated and therefore not added.


Section
titleCSS Classes

List of HTML class names to be added to the rendered HTML element.


Section
titleRender

Controls the rendering of the calculated value.

The following values for this parameter are valid.

Parameter ValueDescription
firstThe value calculated by the first formula is rendered (default).
none

Nothing is rendered as text, but the element with the data elements still is.

Choose this option if all calculated values are rendered at different locations down the document.

last

The value calculated by the last formula is rendered.

Choose this option if your formula requires the result of prior defined formulas



Transclusion
taget-heading-level*
documentDisplay Table Macro
idsRender no hits as blank



Transclusion
taget-heading-level*
documentDisplay Table Macro
idsNo Hits Text



Section Index
selectName, Short Description, Data Type|, Since|
render-counter-columntrue


Section Compiler by Reference
refDefined Parameters
render-classesparameters-sections, section-compiler-by-reference, parameters
force-showtrue
ids-Description, Details
extract-short-desctrue




...

The format used to translate the calculated value, both of the Aggregate Formula and the Line Formula.

The value is a valid number format in Java and defaults to decimal.

Valid values are integer, decimal, currency, and anything that can be parsed by DecimalFormat.

Section
titleMacro Body

The body contains the set of formula specifications to calculate values. Each specification of a formula contain a

  1. Name,
  2. the Aggregate FormulaFormat,
  3. the FormatDocument Formula,
  4. the Line Result Formula,
  5. the Input Mapping, and
  6. the Output Mapping.

The elements of the specification are provided in any order within the cells of a table.

NameFormatLine Document FormulaAggregate Result FormulaInput MappingOutput Mapping


















..................


Section
titleName

Identifies the formula and the calculated result.


Section
titleFormat

The format used to translate the calculated value, both of the Document Formula and the Result Formula.

The value is a valid number format in Java and defaults to decimal.

Valid values are integer, decimal, currency, and anything that can be parsed by DecimalFormat.

Caution Box
titleFormat applied to Formulas

Note that the format will be applied to the Document Formula (right column) and the Result Formula (left column) in case the Format column is specified left of them.



Section
titleDocument Aggregate Formula

The formula applied to calculate from each document in the result set.

Use placeholders, like ${Document_Propery_Name} to select values from the documents in the result set.

Example Box
titleExamples for Line Formula


Code Block
languagetext
titleCalculating story points
${Story Points} * ${Story Weight}


Code Block
languagetext
titleAdd up the team sizes
${Team Size}




Section
titleResult Formula

The formula to be applied to the result of the Document Formulas aggregate the single values extracted by the Line Formula.

The formula may contain placeholders to values of the document that contains the macro.

The formula may use the placeholders ${SUM}, ${PROD}, ${COUNT}, ${MIN}, and ${COUNTMAX}. Formulas may use values calculated by formulas defined in a line before it.

PlaceholderDescription
 ${SUM}The sum of values calculated by the Line Document Formula.
${PROD}The product of values calculated by the Document Formula.
${MIN}The minimum value calculated by the Document Formula.
${MAX}The maximum value calculated by the Document Formula.
${COUNT}

The count of documents that provided a value for the Line Document Formula.

For instance if a document does not apply properties for all values of the Line Document Formula, it does neither contribute to the sum nor to the count.

${NAME_OF_FORMULAname-of-formula}

Where NAME_OF_FORMULA name-of-formula stands for the name of a formula that has been define above the formula that wants to use it.

${NAME_OF_FORMULA$name-of-formula_SUM}

The sum value calculated by the formula named NAME_OF_FORMULA name-of-formula.

${NAME_OF_FORMULA§name-of-formula_PROD}

The count product value calculated by the formula named NAME_OF_FORMULA.

Example Box
titleExamples for Aggregate Formula
Code Block
languagetext
titleUse the sum
${SUM}
Code Block
languagetext
titleUse the average
${SUM}/${COUNT}
Section
titleFormat
Caution Box
titleFormat applied to Formulas

Note that the format will be applied to the Line Formula (right column) and the Aggregate Formula (left column) in case the Format column is specified left of them.

name-of-formula.

${name-of-formula_MIN}

The minimum value calculated by the Document Formula of name-of-formula.

${name-of-formula_MAX}

The maximum value calculated by the Document Formula of name-of-formula.

${name-of-formula_COUNT}

The count value calculated by the formula named name-of-formula

Section
titleLine Formula

The formula applied to calculate from each document in the result set.

Use placeholders, like ${Document_Propery_Name} to select values from the documents in the result set

.


Example Box
titleExamples for Line Aggregate Formula


Code Block
languagetext
titleCalculating story pointsUse the sum
${Story Points} * ${Story Weight}SUM}


Code Block
languagetext
titleAdd up Use the team sizesaverage
${SUM}/${Team SizeCOUNT}




Section
titleInput Mapping

A two-column table to map an input to be applied to a value read from the documents.

This allows to translate text to double values. The mapping is applied to the documents of the result set and the document that contains the macro.

The first column contains the value in its normalized rendered form. The second value is the numeric value to replace that rendered form.

Example Box
titleExample configuration for the Input Mapping


Input Mapping


Good2
Great4
Top Notch8





Section
titleOutput Mapping

A two-column table to map a double result value to a textual value, such as the Status Macro. The mapping is applied to the final result of the Aggregate Formula Result Formula.

The first column allows single numeric values and ranges of the format:

Code Block
languagetext
titleRange format
D MIN ; MAX D


TokenDescription
D

The delimiter D may be either [ or ].

  • If [ is specified for
    • the start value, then the start value is included.
    • the end value, then the end value is excluded.
  • If ] is specified for
    • the start value, then the start value is excluded.
    • the end value, then the end value included.
MIN

The minimum value of the range.

If omitted, the minimum value of the range is the absolute minimum value. Any value smaller than MAX is accepted.

MAX

The maximum value of the range.

If omitted, the maximum value of the range is the absolute maximum value. Any value greater than MIN is accepted.

The defined mappings are processed from top to bottom. The first matching rule provided the representation.

Where one space is shown in the format above there may be any number of spaces, including zero spaces.

Example Box
titleRange examples


Code Block
languagetext
titleEvery value greater than or equal to 10 and smaller than or equal to 30 is accepted
[10;30]


Code Block
languagetext
titleAny number smaller than or equal to 30 is accepted
[;30]


Code Block
languagetext
titleThe number must be exactly 30 - both representations are correct
30

[30;30]


Code Block
languagetext
titleEvery value greater than 10 is accepted
]10;]



Example Box
titleExample configuration for the Output Mapping


Output Mapping


[;10]
Status
colourGrey
titleGood
]10;20]
Status
colourBlue
titleGreat
]20;]
Status
colourGreen
titleTop notch!





...