Features used to implement the example



Example: Set security level depending on reporter or creator

I want to set the Issue Security in the workflow based on the user who creates the issue.

Example:

  • User belongs to "Group A" set "Security Level A".
  • User belongs to "Group B" set "Security Level B".

This behavior can be implemented using post-function Set a field as a function of other fields with the following configuration:


Note that:

  • %{00006} is field code for Reporter
  • You could also use field Creator (field code %{00148}) instead, which is the actual user who created the issue, Field Reporter can be edited, while Creator can't
  • You could use function "isInRole(string user_name,string role_namestring project_key) : boolean" to make it dependent on project role. You should use field Project Key (field code %{00018}) in the third argument

Once configured, the transition will look like this:





Other examples of that function



Related Usage Examples