Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Section


Column
width30%600px


Panel
borderColor#333f48
bgColor#FFFFFF
titleColor#eeeeee
borderWidth1
titleBGColor#333f48
borderStylesolid
titleOn this page

Table of Contents
maxLevel1



Column




Example: Limit issue creation per role and issue type

A well known limitation of Jira is that it's not possible to set issue creation permissions per Issue Type. We are going to show how to overcome this limitation by inserting a validation in "Create issue" transition in a workflow.

We will show two different solutions based on two different features of Jira Workflow Toolbox:


Let's suppose that we want to limit issue creation in a workflow, only to user in project roles "Developers" or "Testers". To do it we will introduce a validator Users in field are (not) in a project role in transition "Create issue" with the following configuration:

 


Once configured, transition "Create issue" will look like this:


 


Alternative implementation

Let's we implement in a workflow the following issue creation permissions per issue type and project role:

  • Issue type "Bug" can only be create by users in project roles "Users" or "Testers"
  • Issue type "Improvement" can only be create by users in project roles "Testers" or "Product Managers"
  • Issue type "New Feature" can only be create by users in project role "Product Managers"


We will introduce in transition "Create issue" a validator Boolean validator with math, date-time or text-string terms with the following configuration:


Boolean expression used is:

(%{00014} = "Bug" IMPLIES (isInRole(%{00020}, "Testers") OR isInRole(%{00020}, "Users"))) AND (%{00014} = "Improvement" IMPLIES (isInRole(%{00020}, "Testers") OR isInRole(%{00020}, "Product Managers"))) AND (%{00014} = "New Feature" IMPLIES isInRole(%{00020}, "Product Managers")) 


Note that:

  • %{00014} is code for "Issue type"
  • %{00020} is code for "Current user"


Once configured, transition "Create issue" will look like this:



Other examples of that functions

Users in field are (not) in a project role

Incoming Links
pageUsers in field are (not) in a project role
labelsexample



Boolean validator with math, date-time or text-string terms

Incoming Links
pageBoolean condition and validator with math, . date-time or text-string terms
labelsexample



Related Usage Examples

Content by Label
showSpacefalse
cqllabel = "example" and label = "validator"