Adding and customizing templates for Word and Excel export #5679013/HEAD / v294 |
Tags:
not added yet
Table of Contents
Security of the export TemplatesImportant: System Administrators must carefully review export Excel Templates before uploading to the System !!!The Word or Excel Templates contain powerful scripts (Groovy or other script languages), which makes these export Templates a very powerful tool, and as such "great power comes great responsibility". System Administrators must carefully review the Excel Templates and their scripts, so they don't cause any malfunctions, malicious attacks or security problems in codebeamer! To enforce the security reviews the execution and location of Templates has been revised in codeBeamer 9.4. From codebeamer 10.0, the following aplies to Templates uploaded:
Storing Word/Excel report TemplatesYou can create and add new and customized Word and Excel Templates for codebeamer, and the Word or Excel export GUI will show such custom templates. These templates can be stored in two locations:
Each kind of export needs different export templates: for example a TestRun export needs a different template than a simple Tracker Item export. To separate the templates tailored for certain kinds of export (a TestRun export for example) each type of export has their own subfolder in the main template directory. For example, when exporting TestRuns the templates are shown from the ../exporttemplates/TestRuns directory in the file system and similarly from the .codeBeamer/Templates/TestRuns directory in the Document Management. The template directories for different kinds of exports are:
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.
For security reasons the Excel templates in the Document Management can only be used for export if these are uploaded by a System Administrator. The System Administrator must review the Excel template's content to avoid potential security problems or misuses by the scripts in the templates! As for Word templates, any user's upload can be used for export.
However if the template needs to appear in all projects, the template should be put into the file system. The limitations are that you need to be System Administrator to access the file system. Also these templates cannot be limited: they will appear for all users who can do exports. Merging the global templates from file system and Document ManagementWhen performing the export the GUI will show templates from both the file system and Document Management. This screenshot illustrates how it works: the list contains templates from both places (file system, Document Management):
Adding templates to Document ManagementAdding new templates to Document Management is simple: when executing a certain kind of export click on the "Manage custom templates" link: the directory, where the templates can be stored, is opened. 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, this will appear on the UI, instead of the file name. The files are appearing in alphabetical order of their names on the UI. Adding Global Templates to file systemYou 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. To add a new TestRun export file, called customTestRunExport.docx, navigate to the file system of codebeamer and find the $CB_HOME/tomcat/webapps/cb/exporttemplates/TestRuns directory. This folder contains the Word and 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 filesIf you upload a new template like customTestRunExport.docx then this filename appears in the template list. To make filenames easier to comprehend in the template list:
Translating/transforming template's namesEach template file can have a more readable and user-friendly 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 in such a way that exporttemplates directory contains configuration files where the filename transformations can be configured similarly to ApplicationResources.properties. The translations configured in the following files:
These translation files contain the file name of 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 templatesThe order of the template files is configured in the order.txt files on the file system. These files contain the file names in the desired order. So if you want to add their custom template and appear at the first place on the list, then the template file should be added to the folder and the file name at the first line of order.txt. |
Fast Links
![]() codebeamer Overview codebeamer Knowledge Base Services by Intland Software |
This website stores cookies on your computer. These cookies are used to improve your browsing experience, constantly optimize the functionality and content of our website, furthermore helps us to understand your interests and provide more personalized services to you, both on this website and through other media. With your permission we and our partners may use precise geolocation data and identification through device scanning. You may click accept to consent to our and our partners’ processing as described above. Please be aware that some processing of your personal data may not require your consent, but you have a right to object to such processing. By using our website, you acknowledge this notice of our cookie practices. By accepting and continuing to browse this site, you agree to this use. For more information about the cookies we use, please visit our Privacy Policy.Your preferences will apply to this website only.
Note that user-behavior analytics are being captured on this server for the purpose of improving the Codebeamer user experience.