This plugin gives you the ability to perform different actions/validations before saving a LiveDoc document, as well as trigger multiple actions after the save. This all is possible using a smarty build script engine that executes user-written custom scripts.
Product Features
- This extension makes it easy to run your own script files before or after saving/creating a LiveDoc document.
- It gives you the option to perform an action before a LiveDoc is saved (pre-hook with the option to deny the save) or after it has been successfully saved.
- It does not require a Polarion server restart to deploy/adjust scripts.
- It is easy to plug into any Polarion instance.
- An easy guide and sample script are provided for better understanding.
Installation
- Stop the Polarion server.
- Create folder path
\Polarion\polarion\extensions\com.intelizign.livedocsave.actions\eclipse\plugins
. - Copy the extension file
com.intelizign.livedocsave.actions_X.X.X.jar
to folder\Polarion\polarion\extensions\com.intelizign.livedocsave.actions\eclipse\plugins
. - Create folder path
\Polarion\scripts\livedocumentsave
- this is the place where you will be placing your custom scripts. - Delete the
.metadata
and.config
folders in theworkspace
directory, usually located atC:\Polarion\data\workspace
. - Start the Polarion server.
Getting Started with Sample Example
- After the installation is finished, you can now easily set up your scripts.
- To do so, copy the file
\examples\documenttitle-prefix\pre-save.js
from the directory contained within this extension to the\Polarion\scripts\livedocumentsave
folder. Now, every LiveDoc document will automatically have your User ID appended as a prefix to the Title when you save/create it.
Custom Script Naming Convention
- As the script engine will pick up a custom script only when the naming convention is followed properly, please follow the below syntax for naming a custom script file:
{{project-id}}-{{document-type-name}}-{{action pre-save/post-save}}.js
- If
project-id
is not provided, the script will trigger for all projects with the givendocument-type-name
.
{{document-type-name}}-{{action pre-save/post-save}}.js
- If
project-id
anddocument-type-name
are not provided, the script will trigger for all projects and all document types.
{{action pre-save/post-save}}.js