The options are only removed from the lists, but they are still displayed nicely (with icon and name). This extension can be used to:
- Only allow users of a specific role to create work items of a specific type.
- Only allow users with a specific role to set e.g. severity to "blocker".
- Prevent all users from using specific options.
Installation
- Copy
com.polarion.alm.extension.enumfilter_1.1.0.jar
file to<Polarion Installation>/polarion/plugins
. - Restart Polarion.
Configuration Examples
Role Based Work Item Types
Assumes that only users with the role requirements_engineer should be able to create requirements.
To achieve this, first create a new file called workitem-type-enumfilter.xml and add following content to the file (using a text editor):
<enumeration>
<option id="requirement" roles="requirements_engineer"/>
</enumeration>
After creating the configuration, upload the configuration to the repository. The folder you have to upload to is .polarion/tracker/fields
, relative to the repository root to enable the configuration for all users, or relative to the project location to enable the configuration in the specific project only. You can use the Repository Browser to upload the configuration if you don't have a Subversion client installed locally.
Role Based Severity
Assumes that only users with role manager should be able to set the severity of requirements to "Must Have".
Create a new file called requirement-severity-enumfilter.xml with following content:
<enumeration>
<option id="must_have" roles="manager"/>
</enumeration>
Upload the configuration to ./polarion/tracker/fields
(relative to the repository root or the project location).
Hide old Target Release
Assumes that you define the target release for requirements in an enumeration with the release ID (release-enum.xml), like it is done in the E-Library demo project. Usually it makes no sense to be able to set a version as target release that already is finished. Version 0.9 and Version 1.0 have been released and users should no longer be able to select these versions.
Create a new file called release-enumfilter.xml
with following content:
<enumeration>
<option id="version0.9" roles=""/>
<option id="version1.0" roles=""/>
</enumeration>
Upload the configuration to ./polarion/tracker/fields
(relative to the repository root or the project location).
Configuration Rules
Like other configurations, the configuration for the enumeration filters can be defined type-specific (by prefixing the name of the configuration with <type>-), in project scope or globally.
The configuration files have to be stored in .polarion/tracker/fields
, relative to the project location or the repository root (in the same folder that also stores the enumeration configurations).
The name of the filter configuration files is the same as the name of the enumeration configuration file, only -enum is replaced with -enumfilter.
Configuration File Content
Inside the enumeration root element, any number of option elements with following attributes is allowed:
- id: The id of the option to be filtered.
- roles: A comma-separated list of (global or project) roles. If the current user has one of the role s/he will be able to see the option.
Options that are not mentioned in the configuration are visible to every role.
Editing filtered Enumerations in Polarion
The filtering of the enumeration options is also active in the Administration interface. That means if a specific option is filtered for you, then it also won't be visible in Administration. As long as you don't want to modify or remove the filtered option that's no problem. If you want to do so, you have several options:
- Re-add the filtered option you want to modify.
- Reconfigure the filter to not hide the option.
- Edit the -enum.xml file directly.