You are not logged in. Click here to log in.

codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Tags:  not added yet


Word Reporting using Merge Fields

This feature is available starting from codeBeamer 9.3.0. Supported version is Microsoft Word 2016.

In codeBeamer 9.3 a completely new Word export functionality has been introduced. Our goal was to make customization as easy as possible by still keeping the flexibility. User can create Word templates using standard Word mechanisms without knowing about codeBeamer internals. Scripting was removed from Word template itself, although it is still possible to use scripting to cover more advanced use cases. Legacy solution was completely rewritten so customization options of legacy solution are not working with the new engine. It was replaced with new mechanisms using Word MergeFields and Bookmarks, see chapters below.

Legacy solution (Word Templates in CB 7.2 - 9.2) is still accessible by using legacy templates.

See: Legacy Word export is disabled ?

Known issues

Known issues of Word Export


Default templates

From codeBeamer 9.3 Word export by default is working with the new export engine. If you do not select any template manually then the default template is applied which triggers the new engine.


In case of tracker item export the basic template contains summary, properties, references, associations, description. User can also choose what kind of extra content is exported for each item: comments, history or last review status.

Previously this additional content was controlled by check boxes. In the new engine the template determines what kind of extra content is included.

Different templates can be selected from the list box on the export dialog.

Templates appearing in the list come from two sources, for more information see: Adding and customizing templates for Word and Excel export

  • codeBeamer Document Management:
    • for project level templates
    • .codeBeamer/Templates
  • From file system:
    • for project independent templates
    • $CB_HOME/tomcat/webapps/cb/exporttemplates

Excel Templates from the Document Management will only be shown if they are uploaded by a System Administrator. For more information see Adding and customizing templates for Word and Excel export. As for Word Templates, any user's upload can be used for export. If a template with the same filename can be found both in file system and in project level templates, only the template from filesystem can be selected during export

Each template context has its own sub-folder:

  • Trackers
  • TestCases
  • TestRuns
  • Traceability
  • Coverage
  • Review
  • ReleaseNotes
  • Wiki

Legacy export solution will only be available if user uploads a legacy template. Legacy templates will not be shipped with 9.3.

codeBeamer detects which kind of template the user selects or uploads (merge field based or legacy).

User interface shows check boxes for extra content only in case of legacy templates.

See more information on template management: Adding and customizing templates for Word and Excel export

Important Word Settings and Shortcuts

Switch to view field code of a particular merge field: SHIFT + F9

Switch to view field codes for all merge fields: ALT + F9

Insert a new merge field:

Insert / Text / Quick parts / Field / Merge field

Manage bookmarks:

Insert / Links / Bookmark

Make bookmarks visible:

File / Options / Advanced / Show document content / Show bookmarks

Make content controls visible:

File / Options / Customize Ribbon / check Developer

Manage content controls:

Developer / Content control


Merge fields

Word export templates are mainly consists of static content and placeholders which will be populated during the export process. For these placeholders a specific Word field type is used - Merge Fields - eg. <<item.name>>

Merge fields can be inserted from the ribbon Insert / Text / Quick parts / Field...


Merge fields can be edited using right-click context menu. This will show the same window as in case of insert.



Never edit a MergeField directly in the document! Both field name and code can be changed after a field has been inserted. But this must be done using the Field window, see below. It is accessible from right-click context menu. Do not edit field name or field code inline. (It creates complex markup including change tracking what the export can not process.)


In case of insert or edit the following window appears:


Field codes for date / number / currency formatting can be entered when inserting or editing a merge field, by clicking the button Field Codes on the bottom of the window.


Word limitation - When editing an existing merge field, existing field codes are not shown on the user interface. When editing field codes existing ones are overwritten. You can view existing field codes by pressing ALT+F9.


Formatting fields

By default, formatting defined on merge fields is applied to the replaced content during export. Font, size, color, alignment, styles all received by the content which is rendered into the field.

Wiki fields are an exception from above behaviour. Wiki fields have its own formatting inside codeBeamer and that formatting can not be overwritten by Word template. Content of wiki fields should look like (more or less) the same as on web regardless of formatting of mergefield in the template.

Wiki fields are rendered as html then inserted into the Word document. Currently supported ways of using wiki/html mergefields in templates are:

  • put them into a separate line - which should not contain anything else
  • put them into a Word table - which would solve the indentation problems too

Formatting date fields using field codes:

Define Date and Numeric Formats for Mail Merge Fields

Formatting Date Fields


Available merge fields

Merge field names are case sensitive.

All tracker item fields are accessible by label including custom fields. Labels are expected in the same format how it is returned on REST API.

(Labels are converted to a camel case format. First letter is always lowercase. Then starting letter of subsequent words are capital letters. Capital letters inside a specific word are kept.)

Examples:

  • item.closedAt
  • item.modifiedBy.name
  • The label "I am a Custom field. 20 camelCase" can be accessed as "iAmACustomField20CamelCase".

You can verify names on the REST API. Populate certain field on an item then query it through following url:

/rest/item/<itemId>
Word export Merge Field notation follows notation of codeBeamer REST API with some extensions. Properties which are available there are available here as well.
Plus there are additional data available for export purposes. Appendix contains available field names.


If a tracker field label is changed then name on REST API changes with it. As a result Word Export template should be updated as well or else field will remain empty in document.

ALT_WIKI:EMOTICON:%28%21%29%20 Although there are some exceptions, following fields are not affected by renaming field labels, they are fixed:

priority, comments, staff, closedAt


You can find available merge fields here:

Word Export Placeholder Listing - CB 9.3 and higher

From codeBeamer 9.4 you can generate this listing dynamically which includes all fields including custom fields:

List available fields CB 9.4+


Following fields should not be used as tracker field name as it conflicts with export's built-in field names:
author, title, baseline, exportDateTime, project, tracker, release, combinedTopLevelReviewStats, reviewStatsByReviewer, combinedStats


Number of elements in multi-value fields can be accessed by <<*Count>> property. Examples:

  • in case of <<item.downstream>> field <<item.downstreamCount>> can be used
  • in case of <<item.assignedTo>> field <<item.assignedToCount>> can be used


Multi-value fields can be printed simply without bookmark loops too. In this case only the names will be shown, separated by comma.

eg.: "item.assignedTo"

When there is a need for more complex look, then bookmark loops can be used with specific fields/properties. Please see next chapter.

Comments

If "item.commentsPlace" is inside the template then item comments are added to the document as Word comments, anchored to this point.

This field should be put into a separate line in the template like it is done in case of default templates.


Hyperlink fields

See: Hyperlink fields


Bookmark blocks

When you are exporting a multi value field like a choice list then using only merge fields is not enough. A loop must be defined in the template by adding bookmarks.

When you are editing the template in Word select Insert / Links / Bookmark on the ribbon. This will show you a small window where you can view and manage existing bookmarks in the document.

By entering a name and clicking Add you can create a new bookmark on the current selection. In the below example the bookmark "loop_item_upstream" is created on the table row which is selected.

By selecting a block of document and creating a bookmark on it you are defining which part of document should be the body of the respective loop.


Squared brackets show the begin and end of the bookmarked block. This is not visible by default, you can switch it on at File / Options / Advanced / Show document content / Show bookmarks.



Name of bookmark blocks must match to respective merge field names.

  • eg. merge field name "item.downstream.name"
  • respective bookmark name "loop_item_downstream"

If you define a custom field with label "Related Bugs" then

  • merge field name: "item.relatedBugs.name"
  • bookmark name: "loop_item_relatedBugs"
  • Note: In case of custom choice lists only "id", "name" and "urlName" merge fields are available.

All bookmark names are case sensitive like merge field names.


Currently bookmark loop detection is relying on the location of the bookmarkStart tag.

If bookmark starts inside a table then particular table row will be looped (referred as table row loop from now).

If bookmark start outside a table then included paragraphs/tables will be looped (referred as paragraph loop from now).


When copying content which includes bookmarks then bookmarks will not be copied because of duplication.

Bookmark names have to be unique in the document. User has to create a new bookmark by altering the name of the original bookmark.


When using the same loop multiple times in a document, then user has to add some postfix to alter the name of bookmark.

eg.: loop_item_downstream2, loop_item_downstreamPostfix

Underscore used to determine levels, so it cannot be used in the postfix.

eg.: loop_item_downstream_postfix => will not work


ALT_WIKI:EMOTICON:%28%21%29%20 In a "loop_item_downstream" you can refer only onto the array "item.downstream". For referring another arrays you have to specify loops for each of them respectively.

Eg.: Referring onto "item.upstream.name" inside "loop_item_downstream" will result in error.


Limitations:

  • loops in tables
    • only loops one row, the first row inside bookmark
    • single cell can not be repeated only the whole row
  • loops outside tables
    • when user wants to create a paragraph loop starting with a table then bookmark has to start in a line before the table (not in the same line)
      • otherwise it will be detected as a table row loop
    • if a paragraph loop is followed by a table then there must be an empty new line between the end of the bookmark and the table

Rendering table fields of trackers

Columns of table fields can be accessed by their index starting from zero:

  • item.tableName.col0
  • item.tableName.col1
  • item.tableName.col2
  • ...

From codeBeamer version 20.11 columns can be accessed by label as well.

Labels are expected in a camel-case format, see explanation above: Available merge fields

Table column names can be verified on Swagger API using following url. In the result look for "legacyRestName"

/api/v3/trackers/<trackerId>/fields/<fieldId>

In test management custom test step fields (columns) can be accessed same way.

Examples:

  • item.testSteps.action
  • item.testSteps.expectedResult
  • item.testSteps.customColumn

These merge fields must be inside a bookmark called "loop_item_tableName" which will iterate through the rows of the table.

Built-in default Test Case template is a good example with a table called "testSteps": template-test-cases-base.docx

Another example using custom test step fields as well: template-test-cases-custom-cols.docx


Another example with table called "customTable":

Please note: For table fields to work in Word export "Row numbers" option must be checked on the table field in the tracker configuration.


Links to codeBeamer Resources

Links to codeBeamer resources can appear in Word export documents in two different ways. If you check "Generate absolute links" then all link will point to the codeBeamer instance where export was initiated. See screen below.

If above checkbox is left unchecked, then those links which point onto items present in the currently exported document will become internal links pointing onto bookmarks inside the document. This is a feature which helps in offline work, when codeBeamer instance is not accessible.

ALT_WIKI:EMOTICON:%28%21%29%20 Internal links are used only for items selected for export, links to item references are still using absolute links to codeBeamer. Technically where <<item.name>> merge field is present, a bookmark is inserted. In case a link found onto that item, then it is replaced to point to this bookmark instead.

Heading styles

If a line is formatted with a heading style in the template then the exported document will also use this heading style. You can see this in case of headings in standard template.

Usage of heading levels in case of item hierarchies start from the level defined in template (starting from version codeBeamer 9.5). Eg. if <<item.name>> is formatted with Heading 2 then top-level items will have Heading 2 and their children will have Heading 3 and their children Heading 4 etc. Heading styles will follow as the hierarchy goes deeper.


ALT_WIKI:EMOTICON:%28%21%29%20 In codeBeamer 9.3 and 9.4 item hierarchies always started from fixed level "Heading 3".

If you want to change the numbering and start at a different level eg. at 1.1. instead of 1.1.1. then in Word you can adjust which heading belongs to which list level.

Right click on number / Adjust List Indents... / More >>


Velocity macros

Location of velocity macro library:

tomcat/webapps/cb/config/templates/export/mergefields.vm

Velocity macro names are all lower case as the examples show:

eg.: field_item_downstream_name

eg.: property_name


To evaluate value of a field a velocity macro is called based on the field name. This provides an extra customization option for the user where some kind of text transformation can be implemented.

There are two type of macros:

  • Field macros
    • using a prefix "field_"
    • matching on specific merge fields, eg.: "field_item_downstream_id" will match on field "item.downstream.id"
  • Property macros
    • matching on the property name of a field, eg.: "property_result" matches to all merge fields ending with "result", like "item.testCaseRuns.result"
    • This means user can define a unified behavior for all fields referring the property "result".

New merge fields can be defined by creating new velocity macros.


Properties starting with "url" will be a hyperlink

  • macro name eg.: "property_urlName"
  • display text can be defined by creating / using velocity macros like "property_urlName", "property_urlKeyId"
    • see existing macros in velocity library
  • hyperlink will point onto {codebeamer_url} / uri-of-item
    • eg.: in case of "item.submittedBy.urlName" will point to the user page who is in the submittedBy field
  • if macro not available for field or for property then displayed text will be simply "Link"

Accessible variables in the Velocity context

Item data is available in the form of a JSON data tree. You can see an example of a tree by issuing a simple GET request to the codeBeamer REST API eg.:

/cb/rest/item/<item-id>

Name of a particular merge field selects a specific path in this tree. This path consists of a couple of nodes or objects. All of these selected objects are accessible from the velocity context.

  • ${leaf}
    • The leaf in the JSON tree selected by the actual mergefield (the last object in the selected path).
    • eg. "item.priority.name" => "priority" object
    • eg. "item.history.changes.newValue" => "change" object
  • All levels along the path selected by the particular merge field is accessible through a "lower camel-case" naming convention.
    • Name of each node is converted to lower case, then these lowercase names are joined together so that each node starts with a capital letter except the first one.
      • See examples below: field name => context variable name
      • aaa.bbb.ccc => aaaBbbCcc
      • aaA.bBb.Ccc => aaaBbbCcc
    • eg. in case of merge field "item.history.changes.newValue"
      • ${item}
      • ${itemHistory}
      • ${itemHistoryChanges}
        • this is the same as ${leaf}
    • eg. in case of merge field "item.testCases.name"
      • ${item}
      • ${itemTestcases}
        • ALT_WIKI:EMOTICON:%28%21%29%20 Please note: node "testCases" became "Testcases" becauseof the above mentioned camel-case notation

Conditional formatting

Conditional formatting can be achieved by using multiple merge fields each of which matching to appropriate result of a condition. The default test run template contains a good example:

"item.testCaseRuns.result.name" is formatted/colored differently depending on the value of it.

To make this work you have to introduce new merge fields by creating velocity macros. During rendering only one of the merge fields will have value, the others will be rendered empty.

See example merge fields below:

#macro(field_item_testcaseruns_result_namepassed)
    #set($result = $leaf.get("name").getAsString())
    #if($result == "Passed")
        $result.toUpperCase()
    #end
#end

#macro(field_item_testcaseruns_result_namefailed)
    #set($result = $leaf.get("name").getAsString())
    #if($result == "Failed")
        $result.toUpperCase()
    #end
#end

#macro(field_item_testcaseruns_result_nameelse)
    #set($result = $leaf.get("name").getAsString())
    #if($result != "Passed" && $result != "Failed")
        $result.toUpperCase()
    #end
#end

#macro(field_item_testcaseruns_notrunyet)
    #set($result = $leaf.get("result"))
    ##  if result is null
    #if("$!result" == "")
        NOT RUN YET
    #end
#end

By default empty fields receive a "--" value so this would be a problem if "--" would appear for all merge fields. This can be avoided by adding new entries to existing macro called "not_available". This provides the value which is shown for empty fields.

## empty fields are populated with some n/a value to clearly show something is not available
## if a merge field result remains empty during merging then this macro is run to populate some value

#macro(not_available)

##    Some specific merge fields don't need n/a value but should be actually empty.

##    - A notification is present or not, it is never missing.
##    - Chapter number is also not missing, but it is present or not.
##    - Conditional fields also use this behaviour.
##      From multiple fields only one will get value, others remain empty.

    #if(   $fieldName != "item_changenotif"
        && $fieldName != "item_chapter"
        && $fieldName != "item_testcaseruns_result_namepassed"
        && $fieldName != "item_testcaseruns_result_namefailed"
        && $fieldName != "item_testcaseruns_result_nameelse"
        && $fieldName != "item_testcaseruns_notrunyet"
        && $fieldName != "item_assocout_to_urlkeyid"
        && $fieldName != "item_assocout_urlurl")
    $!naValueFromTemplateParameters
    #end


Convert to PDF

Available from codeBeamer 9.4.0.

User can select "Convert to PDF" option on export dialog. In this case document is rendered same way in docx format but after that it is converted to PDF.



List available fields

Available from codeBeamer 9.4.0.

The user can obtain a document which contains all merge fields available in a specific export context. This is derived from the current status of the tracker configuration, so it is up-to-date as long as it is unchanged. The available fields depend on the trackers in scope or the current use case (for example, tracker export, traceability export, or review export).

The user has to start an export using the following template: template-list-all-fields.docx

Resulting document will contain all available fields.

Content of the resulting document will be a field name listing. Structure is as follows:

  • Meta data fields
    • eg. project.id
    • eg. tracker.keyName
  • Fields by tracker
    • item.*
    • eg.: item.name
    • eg.: item.(array).assignedTo.name
      • above example shows a field name which includes ".(array)". This part shows that the next element ("assignedTo") is an array of elements, not a single element. This ".(array)" is only a meta information it is not part of the actual merge field name. Merge field name will be "item.assignedTo.name" and you will need a bookmark loop around it. Name of the bookmark loop has to be "loop_item_assignedTo".

ALT_WIKI:EMOTICON:%28%21%29%20 A field is included in the list only if it has value in at least one exported item. If there is no item in the exported file which has that value filled in, then that particular field will not be included in the exported document.


Conditional templates

Available from codeBeamer 9.4.0.

From codeBeamer 9.4.0, Word templates can contain conditional parts based on item properties. These conditional blocks can be defined using bookmarks (similarly to loops). Example template below contains two conditional blocks: "if_folder" and "if_not_folder". In this example, folders will be printed as only a name and an underline. Items of other types will have their properties and description included. Example: template-if-folder.docx


Ignore empty folders

To ignore empty folders in the exported document, "if_not_empty_folder" can be used instead of "if_folder".


Custom conditionals

Conditional template blocks are evaluated using velocity macros which are defined in the same velocity macro library as the merge fields themselves. The location of the velocity macro library is the following:

tomcat/webapps/cb/config/templates/export/mergefields.vm

New conditional macros can be easily added to this file. The name of the macro can then be used as a name for conditional blocks.

The JSON representation of the item is available through the $item variable, which is an instance of com.google.gson.JsonObject. See API documentation here: GSON API 2.3.1.

Example:

#macro(if_folder)
    #set($type = $item.getAsJsonObject("type").get("name").getAsString())
    #if ($type == "Folder")
    true
    #else
    false
    #end
#end

Limitations

Nesting conditional blocks

Conditional blocks can not be nested. They must follow the structure visible on the above image. They must be located directly inside "loop_item" and come sequentially after each other. Creating more complex conditionals is possible by creating more complex velocity macros. See sections below.

Bookmark placement

It is not supported to define multiple conditional blocks in a single row. Although one conditional block may span multiple rows.


Conditional and loop blocks should not interfere with each other. If there is no content between two brackets then order of brackets can not be determined. Best practice is to have only one starting or ending bracket in a line. Only exception is when a block ends in the same line in which it starts.


When defining two conditional bookmarks continuously after each another - eg.: "if_folder" followed by "if_not_folder". These must be separated somehow or else the template is not processable. See solution below:

When you insert the first bookmark then make sure to have 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:


This way the ending tag of this bookmark will not interfere with the next bookmark "if_not_folder"

Content of conditional block

Conditional template blocks must contain at least one item merge field <<item.*>>, can not contain only static text. Otherwise condition can not be evaluated because the engine determines current item based on fields inside the conditional block. If conditional block contains only loops and static text then keep in mind that where loop length is zero then same problem occurs.

If adding static text conditionally can not be avoided then this can be done in two ways:

  • By creating a custom field as Velocity macro and implement condition inside it. Eg. it renders text only in case condition evaluates to true.
  • By creating a custom field eg. "item.forceConditionEvaluation" as Velocity macro which renders nothing. Then add this practically empty field to body of conditional block inside the template. To make sure the new custom field will not render "--" add "item_forceconditionevaluation" to macro called "not_available".
  • From cB 10.0 there is an existing <<item.empty>> merge field for above reason.

Conditional blocks should not contain merge field <<item.commentsPlace>>. Please add this merge field outside conditional blocks but inside "loop_item" block.


Rendering parameters

Available from codeBeamer 9.4.0.

The template document can contain extra rendering parameters, see below.

The user can simply copy this part of the template from an example (template-ignore-html.docx).


Notes:

  • The parameters section should be contained in a bookmark named template_parameters.
  • There must be an empty new line just before the the template_parameters bookmark, otherwise export may fail.


Parameter values are defined using Word Content Controls. Parameters are identified by the name of the control.

(To enable the Content Control user interface in Word, go to: Options / Customize Ribbon / check Developer.)



ALT_WIKI:EMOTICON:%28%21%29%20 Plain Text Content Controls have to contain at least a space to be empty, otherwise, they will contain the message "Click or tap here to enter text."


Rendering parameters can be included in or excluded from the export document based on the option "Remove rendering parameters".


Ignore HTML

For the specified wiki fields, HTML formatting will be completely ignored and images will be omitted. In the above example, the fields "description" and "preAction" will only have plain text content.

Replace empty strings

It can be specified in the template what a certain value is inserted into the fields which would otherwise be empty. The default value is "--".


Truncate long history entries

Available from codeBeamer version 21.09

Tracker item history can be exported, see built-in template. History values will not be truncated by default although they can be really long depending on content.

If it is needed then history entries can be shortened by adding following template parameter to the template:

integer.history.entry.max.length

If value is greater than zero then this number of characters are kept during truncation. Otherwise no truncation applied.

See example template attached: template-items-with-history-maxlen.docx


Export Attachments

Available from codeBeamer 9.4.0.

When exporting items to Word, it is also possible to include attachments of the items. In case attachments are exported, the user will get a zip package not just a single document. Attachment files are packed together with the document in a single archive. When opening the document, make sure that you extract the whole package. The file structure of the package looks like the following:

testing - Customer Requirement Specifications
├── attachments
│   ├── 22192
│   │   ├── 129144_2007_09_10_miurablueprint.jpg
│   │   ├── 129145_cblogo-xl.png
│   │   ├── 129149_cbopen.vbs
│   │   ├── 129150_kern.log
│   │   └── 129151_kern.txt
│   ├── 22193
│   │   ├── 129146_egy.bmp
│   │   └── 129147_zizi.pdf
│   └── readme.txt
└── testing - Customer Requirement Specifications.docx

The "attachments" directory contains all attachments from the export. This contains a subdir for each item exported, named by the exported item's id. The original file names are kept, but the attachment id is added as a prefix. The attachment id is globally unique in itself, so it clearly identifies the file. The ".docx" file next to the attachments dir is the result docx file: it contains links to the files in the "attachments" as applicable.

To enable attachment export, the docx template must contain the merge field <<item.attachmentsList>>. This also defines the place where the links and images will be inserted.

There are three different modes for exporting attachments:

  1. Expand means that the attachment will be inlined into the document as an image. The user can specify extensions which will end up in the document as images. The supported file types are: gif, png, bmp, jpg, jpeg, txt, log, and pdf.
    • If no extensions are specified, then all supported attachments will be expanded.
    • The maximum size can be defined for inlined images.
    • In case of expanding PDF files, a thumbnail image is inserted into the document, which shows the first page of the pdf document. This thumbnail is also a link which opens the full document.
      • PDF thumbnail creation is using GhostScriptCB:/images/out.png, which must be installed on the host running codeBeamer. Tested following versions of GhostScript: 9.07, 9.27.
      • "bin" folder of GhostScript installation must be added to PATH environment variable
      • On Windows machines it is needed to restart codeBeamer to make sure that updated PATH variable is being used. Command prompt have to be restarted as well.
  2. Embed means that the attachment will be available in the embedded package and the document will contain a link to it. Extensions can be specified the same way as in the case of the previous mode, but there is no limitation regarding extensions.
    • If no extension is specified, then all attachments which are not expanded will be embedded.
    • If an extension is defined for both expand and embed, then it will be expanded.
    • See example below:
  3. Export
    • Rest of the attachments - which are not expanded or embedded - will be added to the zip package but the document will not refer to those attachments.
    • For technical reasons, if only "export" is checked and none of the other two options above, <<item.attachmentsList>> is still needed in the template. Although in this case no attachments will be rendered into the document and this merge field will be empty.

The configuration of these options can be done through the docx template. See below:

Here is an example template which contains the configuration for the export of attachments: template-items-export-attachments.docx.


ALT_WIKI:EMOTICON:%28%21%29%20 Values inside the parameter table are given inside content control blocks. When editing values, make sure that you enter values inside those controls. Parameters are identified using the name of these content controls.


The result of expanding a "txt" or "log" file is shown below. The file name is a link in the header: when you ctrl-click on that link, it will open the full-text file in the Windows' registered appropriate/text editor. The text below only shows the first 1000 characters with an "..." at the end if the text is shortened. Note the red warning which reminds the user that this is NOT the full text, only the beginning of it.


System Admin Configuration of Word Export

Word export is implemented as a separate application from codeBeamer. It can run locally on same host as codeBeamer or it can run as separate service on another host.


By default Word export is running as a separate process on the same host where codeBeamer is running. For each export job a new process is started.

When a job is started codeBeamer is passing some initial data to export application through file system (like IDs of trackers to export).

However most of data is queried from codeBeamer REST and Swagger API-s.

For making these calls export application needs to know where codeBeamer is accessible. This is why a callback URL is necessary.

codeBeamer tries to calculate this URL automatically however in cases where codeBeamer is behind a frontend (eg. Apache httpd) this is not possible and administrators have to configure this URL manually.

(From codeBeamer version 10.1 Word export can be run as separate service on another host as well however this needs extra installation/configuration. See: Application Configuration)


Configuration can be done at System Admin / Application Configuration:


An example configuration:

"applicationApi" : {
  "callbackUrl" : "http://localhost:8080/cb"
},
"wordExport" : {
  "debugLogging" : false,
  "jvmArguments" : "-Xmx3G",
  "maxParallelProcesses" : 3,
  "restLoaderPageSize" : 50,
  "timeoutSeconds" : 3600
},
"interactive" : {
  "maxAllowedWordExportItemCount" : 5000
}

See relevant documentation of Application Configuration: Application Configuration "wordExport" section

Accessing logs of Word Export component

When word export is running locally then logs can be found under codeBeamer log folder.

Before codeBeamer version 21.09:

  • Logs are under a sub folder "cb-export-app-logs" under codeBeamer log folder.
  • Each export job had its own log with the process id in the file name.

Starting from codeBeamer version 21.09:

  • Logs can be found directly under codeBeamer log folder as a single rolled log file: cb-export-app-log.txt
  • When you download logs from Server Status Dashboard then it will include that as well.