This hook for the Work Item Action Interceptor Framework template lets you apply field values from a custom Template Work Item selected from a drop-down list on the Work Item Form.
This hook requires the Work Item Action Interceptor Framework (WIAIF) and Custom Enumeration Factories extensions to run.
How to Install
- Copy the template.jar file to WIAIF's "hooks " folder.
- Reload the plugin from the WIAIF Interceptor Management Page or restart Polarion.
- Add the hook to the WIAIF Properties file (hook.properties) to define which Polarion Projects, Work Item Types and Fields should be affected (as comma-separated values):
- TemplateHook.projects=PROJECT_ID
TemplateHook.PROJECT_ID.types=WI_TYPE_ID
TemplateHook.PROJECT_ID.WI_TYPE_ID.fields=FIELD_ID - i.e:
TemplateHook.projects=elibrary,drivepilot
TemplateHook.elibrary.types=defect,task
TemplateHook.elibrary.defect.fields=title,description,team
TemplateHook.elibrary.task.fields=title,description,priority
TemplateHook.drivepilot.types=*
TemplateHook.drivepilot.*.fields=title,priority
- TemplateHook.projects=PROJECT_ID
How to Use
- Add a Boolean custom field with is_template as the ID to your target Work Item types.
- Add an Enumeration custom field with template_wi as the ID to your target Work Item types.
- This enumeration type is from the Custom Enumeration Factory extension.
- Configure the Work Items' Forms to show the newly created fields.
- <field id="is_template"/>
- <field id="template_wi"/>
- When you Save, the system will automatically trigger the hook and copy the values from the selected Template Work Item if a Work Item is selected in the Template Work Item field.
- The visibility of the Template Work Item field can be restricted using Form Configuration so that it's only visible in the Draft state or only when the Work Item is initially created.
Similar functionality was also implemented as a Classic Wiki Script: Create New Work Item from a Template