This Polarion extension provides possibility to run custom Java code (via hooks), before Polarion saves/deletes a Work Item, Document, Plan or Test Run.
This extension can be produced using maven:
mvn clean package
To install extension to Polarion ch.sbb.polarion.extension.interceptor-manager-<version>.jar
should be copied to <polarion_home>/polarion/extensions/ch.sbb.polarion.extension.interceptor-manager/eclipse/plugins
.
It can be done manually or automated using maven build:
mvn clean install -P install-to-local-polarion
For automated installation with maven env variable POLARION_HOME
should be defined and point to folder where Polarion is installed.
Changes only take effect after restart of Polarion.
Use Administration -> Interceptor Manager -> Settings page to enable/disable or set specific properties for each existing hook.
Copy hook jar to hooks folder (<polarion_home>/polarion/extensions/ch.sbb.polarion.extension.interceptor-manager/eclipse/plugins/hooks
) and enforce hooks reloading from the settings page or restart Polarion.
By default, newly added hooks are disabled and must be enabled manually.
Hooks can be located in another Polarion extension. In this case, the following two approaches to register the hooks are supported:
- OSGi Services, illustrated in example: Delete Non-resolved Module Comments as OSGi Service
- Google Guice, illustrated in example: Delete Non-resolved Module Comments as Guice Module
This extension provides REST API. OpenAPI Specification can be obtained here.
Version 3.0.0 has received significant change - project+package rename. Verify you're using the new subfolder name in the extensions
folder.
Also, this change prevents previous hooks versions from working. They must be replaced with the new ones built especially for v.3.0.0+. Note that doing this will reset hooks settings tho their default values, so do not forget to backup your actual settings to restore them after update.
Version 2.0.0 requires the new hooks model therefore hooks built for 1.x.x will stop working. They must be replaced with the new ones built especially for v.2.0.0+. Also the new version introduced some significant internal settings model changes/improvements which have made old settings data incompatible. This means that during the first run all settings will be reset to their default values (unfortunately revisions history will be lost too).