Following information is for codeBeamer 9.3.x and above !
Storing Word/Excel report templates
You can create and add new and customized Word and Excel templates to codeBeamer, and the Word or Excel export GUI will show such custom templates. These templates can be stored in two locations:
- The Document Management: each project has several folders below the .codeBeamer/Templates directory in the Document-management.
- From a directory in the file-system: below $CB_HOME/tomcat/webapps/cb/exporttemplates this can contain templates.
Each kind of exports needs different export templates: for example a TestRun export needs completely different template than a simple Tracker-item export.
To separate the templates tailored for certain kind of export (a TestRun export for example) each export-kind has their own subfolder below the main folder of the templates. For example when exporting TestRuns the templates are shown from the "../exporttemplates/TestRuns" directory in the file-system and the similarly from the ".codeBeamer/Templates/TestRuns" directory in the Document Management.
The template directories for different kind of exports are:
Directory |
What kind of templates? |
Trackers |
Templates for exporting non-categorized Work items like bugs or tasks |
TestCases |
exporting TestCases |
TestRuns |
exporting TestRuns |
Coverage |
exporting Coverages |
Traceability |
exporting Traceability reports |
Wiki |
exporting Wiki pages |
Review |
exporting Reviews |
ReleaseNotes |
exporting Release Notes |
TrackerHistory |
exporting Tracker's changes' history (audit)
|
Where should I store the new templates then?
If your template is specific to a certain project then you can add your template to the Document Management directory, note however that this template will be only shown for the project where the template is. The additional benefit is that you can use the built-in permission control of the Document Management to control who can use a template file.
However if your template needs to appear in all projects then this template should be put to the file-system. The limitations are that you need to be system-admin to access to the file-system. Also these templates can not be limited: they will appear for all users who can do exports.
Merging the global templates from File-system and Document management
When performing the export the export GUI will show both templates from the File-System and also from Document management. This screenshot illustrates how it works: the template's-list contains both the templates:
Adding templates to Document Management
Adding new templates to Document Management is simple: when executing a certain kind of export click on the "Manage custom templates" link on the GUI: and this link will open the directory for where the templates can be stored.
If you add a new template (or delete an existing) then this template will appear next time in the appropriate export dialog.
If you add some Wiki description to the template file then that description will appear on the UI instead of the file name. The files' are appearing in the order of their names on the UI.
Adding Global templates to File-system
You can also add Global templates to the File-system. For this you need to be system administrator with access to the file-system of your codeBeamer server.
For example to add a new TestRun export file called "customTestRunExport.docx" go to the file-system of CB and find the " $CB_HOME/tomcat/webapps/cb/exporttemplates/TestRuns" folder. This folder contains the Word or Excel export files for TestRuns.
If you upload your customTestRunExport.docx file here: the export UI of TestRuns will immediately show that (no restart needed).
Customizing the name and the order of new template files
If you upload a new template like "customTestRunExport.docx" then you will see that this file-name will appear in the template-list.
To make this file name look nicer in the template-list you can:
- Transform/translate the file-name to something more readable/user friendly
- Customize the order the templates appear on the UI: for example move your new template to the beginning of the list.
So each template-file can have an nicer/user-friendly readable name, and these names can be also translated to German and other languages.
For this you can add the descriptive name of your template-file to the following files:
This is implemented that way that "exporttemplates" directory contains configuration-files where the file-name transformations can be configured similarly to ApplicationResources.properties. The translations configured in the following files:
file |
content |
templateNames.properties |
The file-name->user friendly mappings for English language |
templateNames_de.properties |
The mappings for German language |
my-templateNames.properties |
User can/should put his own mappings/translations to this file. |
my-templateNames_de.properties |
The User's custom translations for German language |
These translation files contain the file-name to the user-friendly-name mapping: For example the "exporttemplates/Trackers/template-items-all.docx" template file will appear as "English Trackers/template-items-all.docx" on the UI if this is set in the templateNames.properties file.
exporttemplates/Trackers/template-items-all.docx=English Trackers/template-items-all.docx
Ordering of the templates
The order of the template files is configured in the order.txt files on the file-system: these files contain the files in the desired order. So if you want to add their custom template and appear it as 1st in the select list then he need to add the file there and add the file-name to order.txt as first line.
![[!orderOfFiles.png!]](/cb/displayDocument/orderOfFiles.png?doc_id=5684058&version=1&history=false¬ification=false)