Word Templates In Codebeamer: Known Limitations
This section lists certain limitations.
Nesting conditional blocks
The conditional blocks cannot be nested. They must be located directly inside loop_item and come sequentially after each other. You can create more complex conditionals by creating more complex velocity macros.
Bookmark placement
Defining multiple conditional blocks in a single row is not supported. However, one conditional block may span multiple rows. The conditional and loop blocks should not interfere with each other. If there is no content between two brackets, then the order of brackets cannot be determined. Having only one starting or ending bracket in a line is recommended. The only exception is when a block ends in the same line in which it starts.
When defining two conditional bookmarks continuously after each other - for example, the if_folder followed by if_not_folder. These must be separated somehow, or the template cannot be processed. See the following solution:
When you insert the first bookmark, ensure an extra space character at the end of the paragraph. See the dot after
<<item.description>>. Then, make sure to select the paragraph without this extra space character.
Then define the bookmark on this selection:
Doing so, the ending tag of this bookmark will not interfere with the next bookmark if_not_folder.
Content of conditional block
The conditional template blocks must contain at least one item merge field. The<<item.*>> cannot contain only static text. The condition cannot be evaluated because the engine determines the current item based on fields inside the conditional block. If conditional blocks contain only loops and static text, then where loop length is zero, the same problem occurs.
If conditionally adding static text cannot be avoided, then this can be done in two ways:
By creating a custom field as a Velocity macro and implementing conditions inside it. For example, it renders text only if the condition evaluates to true.
By creating a custom field. For example, item.forceConditionEvaluation is a Velocity macro that renders nothing. Then, add this empty field to the body of the conditional block inside the template. To ensure the new custom field will not render – ,add item_forceconditionevaluation to a macro called not_ available.
From Codebeamer 10.0, there is an existing <<item.empty>> merge field for this reason.
The conditional blocks should not contain the merge field
<<item.commentsPlace>>. Add this merge field outside conditional blocks but inside loop_item block.
Was this helpful?