User By Workflow Step

What it is?

The goal of this customfield : define and limit a set of users depending on settings at Workflow Level.

How it works?

The set of user is defined in Meta-Attributes in the Workflow descriptor, and is rendered as a User Customfield.

Which usage?

One if the main usage is very similar as WorkflowBasedPermissionManager (see also JTriks Tutorial).

It will allow you to define Permission at Workflow Level. The difference is that this Workflows Configuration is defining the set of user and not the permission. The permission is alway defined in the Permission Scheme.

To implement it, process as follow (Assignable User permission in following sample) ...

Add a CustomField per Permission

Create a new Users By Workflow Step customfield

  1. Create it by selecting "Users By Workflow Step" and named it as Assignable Users

    UserByStep.AddField

  2. Let selected the dedicated User Picker Searcher, and go to Edit Permission page

    UserByStep.SetDefault

  3. In the Edit Permissions page, select the permission to use as key prefix in the Workflow properties.

    • By default, if no permission is selected, then the key is the customfield Id. (by exemple "customfield_10000")
    • But it is more clear to use a permission, since the most current use will the permission management at Workflow Level.

      (In the sample : Assignable User)

      UserByStep.SelectPermission

  4. A property key is now associated to this customfield (here AssignableUser.rolesOrGroups)

    UserByStep.ReadyToUse



Associate the CustomField to a its Permission

In Permission scheme, grant the Assignable User permission to this Assignable User Customfield (Try to stay coherent) UserByStep.GrantPermission

Limit the Permission to a subset of Users

Configure the set of Users to link to this Customfield by adding one property per Permission.
  1. In Workflows Step properties, add a new property named AssignableUser.rolesOrGroups
  2. in value, concat the User criteria following the below syntaxes

    scopeType:scopeValue or scopeType(conditon):scopeValue


The supported scopeType are :
  • role : For adding users depending on their Project Role
  • group : For adding users depending on their Group Membership
  • issue : For adding users depending on their Issue Role


The supported scopeValue will depends on scopeType :
  • for role : the Role Name
  • for group : the Group Name
  • for issue : the Issue Roles (assignee, reporter, watcher or voter)
To assist you in this edition, you use the Workflow Meta-Attribute Editor provided here.

Editor for UserByStep Meta-Attribute

The only supported condition are IfAssigned and IfNotAssigned (Not supported by the Attrnibute Editor).

Sample Settings

See below a sample of configuration ...

UserByStep.Properties

In above screenshot, each properties will affcet a dedicated CustomField add in the Permission Scheme, and will affect permission only for the current Workflow Step.
  • The AssignIssue.rolesOrGroups properties will allows members of Project Role RD Team Leader to assign the current issue,
  • Following the AssignableUser.rolesOrGroups property, only members of group RD Team will be assignable to this issue,
  • Only te current assignee is allowed to work on issue due to WorkOnIssues.rolesOrGroups property,
  • and finally, in respect of EditIssues.rolesOrGroups property the issue is editable by the assignee if the issue is assigned else by the reporter.
Be free to apply exactly the correct permissions on each Workflows Steps. You have now the power to allow and deny !