DATA CENTER AND SERVER | CLOUD

Statements

The starting element of a statement may contain an argument expression in the form [[\name expr]] where "expr" is the argument expression.

There are three kinds of argument expressions:

  • simple text argument expression

    • the text following the statement name up to the closing ]] is considered the content of the expression

  • evaluated argument expression

    • the text following the statement name up to the closing ]] may contain path expressions such as $selectedProject or $.key and these expressions are evaluated using the current context-item. The result of the expression evaluation is a single context-item that may serve as a context-item for the statement execution or that will be evaluated to a text content to be used as a parameter to the statement execution.

  • composite argument expressions

    • the text following the statement name up to the closing ]] represents a composite expression whose evaluation results into a context-item which will be used in the statement execution. Note that a context-item is used as this may represent a boolean value.

The starting element of a statement begins with an opening character "\", the ending elements begins with a closing character "/".


"apply-template" statement

The apply-template statement requires a simple text argument expression that specifies the name of a template statement present in the Word template. The enclosed text fragment of the statement is ignored during the Word file generation.

During the execution of the statement the text fragment enclosed in the referred named template statement is generated in-place in the Word file using the current context-item.

Example:

[[\template issue-display]] Issue Key : [[$.key]] Issue Summary : [[$.summary]] [[/template]] [[\jql project = $selectedProject order by key desc]] [[\apply-template issue-display]] [[/apply-template]] [[/jql]]

"each" statement

The each statement requires a composite argument expression that results in a single context-item or a sequence of context-items. The text fragment enclosed by the statement is used to generate content in Word file result for each context-item considered by the statement execution.

Example (using a single context-item):

[[\each $selectedProject]] Name : [[$.name]] Manager : [[$.manager]] [[/each]]

Example (using a sequence of context-items) : 

[[\jql project = $selectedProject order by key desc]] Issue Key : [[$.key]] [[\each $.subtasks]] Sub-task Key : [[$.key]] [[/each]] [[/jql]]

"filter" statement

The filter statement requires a evaluated argument expression and the text of the expression evaluation is considered the name of the JIRA filter to be used for retrieving a sequence of JIRA issues that form the sequence of context-items used in the execution of the statement. The text fragment enclosed by the statement is used to generate content in the Word file result for each JIRA issue context-item returned by the JIRA filter search result.

Example :

"if" statement

The if statement requires a composite argument expression that should result in a boolean context-item. The text fragment enclosed by the statement is used to generate content in Word file result if the context-item is not the boolean "False" context-item.

Example:

"jql" statement

The jql statement requires an evaluated argument expression and the text resulting from the evaluation is used as a JIRA JQL command that will be executed during the statement execution to provided the sequence of JIRA issue context-items.

The enclosed text fragment of the statement is used to generate content in the Word file result for each issue context-item returned by the JQL execution.

Example:

"levelheading" statement

The levelheading statement requires an composite argument expression and the text resulting from the evaluation is used to generate a Word hierarchy paragraph on the next level related to an enclosing level heading statement.

The enclosed text fragment of the statement is used to generate content in the Word file that is a child of the generated hierarchy paragraph.

Example :

"property-description" statement Data center only

The property-description statement requires an composite argument expression and the text resulting from the evaluation is used to set the Word file property value "description" on the generated Word file.

The enclosed text fragment of the statement is ignored.

"property-keywords" statement Data center only

The property-keywords statement requires an composite argument expression and the text resulting from the evaluation is used to set the Word file property value "keywords" on the generated Word file.

The enclosed text fragment of the statement is ignored.

"property-subject" statement Data center only

The property-subject statement requires an composite argument expression and the text resulting from the evaluation is used to set the Word file property value "subject" on the generated Word file.

The enclosed text fragment of the statement is ignored.

"property-title" statement Data center only

The property-title statement requires an composite argument expression and the text resulting from the evaluation is used to set the Word file property value "title" on the generated Word file.

The enclosed text fragment of the statement is ignored.

"recurse" statement

The recurse statement requires an evaluated argument expression, this expression is evaluated in in the current execution of the recurse statement. The evaluation result itself will provide the context-item during the recurse statement execution. Once the recurse execution for the current context-item has finished the argument expression is evaluated again using the current context-item which may result again in a context-item or text content. In case the new evaluation does not result into a text content the recurse statement is executed again. Once the recurse argument evaluation results in a text content the recurse execution stops, unwinding possibly existing nested executions.

The enclosed text fragment of the statement is used to generate content in the Word file for the current execution of the recurse statement. The content generated for nested context-item evaluations is by default put at the end of the text fragment, this may be overridden by the recursehere statement.

See Advanced Export Examples

"recursehere" statement

The recursehere statement has no statement expression argument and indicates in the enclosed text fragment of a recurse statement that at the position of this statement the nested context-item of the recurse statement should be generated into the Word file.

See Advanced Export Examples

"template" statement

The template statement requires a simple text argument expression that indicates the name of this language template. The enclosed text fragment will be used in the execution of an apply-template statement.

See "apply-template" statement.

"variable" statement

The variable statement requires a variable name and a value. The statement then declares a new variable with the given name and initializes it with the given value.
Any context item can be used as value for a variable.
Later the value of a variable can be retrieved and used further in the template using the name of the variable in a variable expression.
Variables are commonly used to access outer context items from within an each-loop statement. 

Example:

"wiki" statement

The wiki statement requires a composite argument expressions whose evaluation results in a text content. This text content is interpreted as a standard JIRA Wiki markup or HTML rendered content, depending on the field configuration. This markup is analyzed and its structure is generated as Word elements during the execution of the statement. The generated structure replaces the statement itself in the Word file.

The enclosed text fragment of the statement is ignored.

Example : 

Special Properties

  • visual-headings

    • Use this wiki statement property to render headings for the field as regular text rather than a Word heading (which may interfere with the folder and issue structure for table of contents).

    • Example: