Versions Compared

Key

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

...

Document Properties Marker
doctypeapp-macro
overridefalse


Short DescriptionRun calculations on a set of result documents and renders the results.
NameCalculation Macrohide
Short Namehide
Parent
Parent Property
property-nameName
hide
Audience
Name List
doctyperole
render-no-hits-as-blanktrue
property-restrict-value-rangetrue
propertyAudience
empty-as-nonetrue

Subject
Name List
doctypesubject
propertySubject

Categories
Name List
doctypecategory
property-restrict-value-rangetrue
propertyCategories

Tags

Tag List
namesCalculation
propertyTags

hide
Flagshide
Iteration

Iteration
valueproduction

hide
Identifierprojectdoc-calculation-macro
Type
Name List
doctypeapp-macro-type
render-no-hits-as-blanktrue
property-restrict-value-rangetrue
propertyType

Suite
Name List
doctypeapp, app-extension, product-space
render-no-hits-as-blanktrue
property-restrict-value-rangetrue
defaults-toancestor
propertySuite
hide
App Tool
Name List
doctypeapp-tool
render-no-hits-as-blanktrue
property-restrict-value-rangetrue
defaults-toancestor
propertyApp Tool

Since5.2
Deprecated
Removed
Defined Parameters
Name List
doctypeapp-parameter
render-no-hits-as-blanktrue
render-list-as-comma-separated-valuestrue
no-create-linkstrue
property-restrict-value-rangefalse
propertyDefined Parameters
hide
Sort Keyhide



Section
show-titlefalse
titleDescription

Provide a query to select a set of documents and use formulas to calculate a couple of values. One of these values is rendered, the rest can be accessed by additional macros.

The advantage is mainly that calculating a couple of values is calculated with a higher performance.

...

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 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.



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




...

Section
titleMacro Body

The body contains the set of formula specifications to calculate values. Each specification of a formula contain a Name, the Aggregate Formula, the Format, and the Line Formula.

Code Block
Name Aggregate_Formula #Format: Line_Formula


Section
titleName

Identifies the formula and the calculated result.


Section
titleAggregate Formula

The formula to 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} and ${COUNT}. Formulas may use values calculated by formulas defined in a line before it.

PlaceholderDescription
 ${SUM}The sum of values calculated by the Line Formula.
${COUNT}

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

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

${NAME_OF_FORMULA}

Where 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$}

The sum value calculated by the formula named NAME_OF_FORMULA.

${NAME_OF_FORMULA§}

The count value calculated by the formula named NAME_OF_FORMULA.


Example Box


Code Block
story-points-avg ${SUM}/${COUNT}: ${Story Points} * ${Story Weight}
team-size-days ${SUM}: ${Team Size}




Section
titleFormat

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
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.


...