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




Purpose

There is a condition and a validator available for checking the value of a Project Properties. These features allows to hide a transition (condition) or block the execution of a transition if certain Project Properties doesn't contain an expected value.

These features are of great value for building reusable workflows, that behave somehow differently according to certain characteristics of the projects. Each particular characteristic of the project is set by means of a Project Properties.



Example: Allowing issue reopening in certain projects, while forbidding it in other ones

We are going to implement a validation for preventing issues to be reopened in projects where Project Properties "allowReopening" has value different from "Yes" or is missing.

We use 1804152 validator in transition "Reopen Issue" using the following configuration:



Once configured, transition "Reopen Issue" looks like this:



The project property is created in project's description as shown:



Jira Workflow Toolbox provides a Expression Parser, which is used in the main features of the plugin. This parser provides a set of functions for checking the existence of a project property, and reading its value:

FUNCTIONRETURNED VALUE
projectProperty(string property_name) : stringReturns a string with the value of project property with name property_name in current issue's project. Shows an error message if project property doesn't exist.
Example: projectProperty("maxNumberOfReopenings") returns "3", provided there is a string {maxNumberOfReopenings=3} in the description of current issue's project.
projectProperty(string property_name, string project_key) : string
Available since version 2.2
Returns a string with the value of project property with name property_name in project with key project_key. Shows an error message if project property doesn't exist.
Example: projectProperty("maxNumberOfReopenings", "CRM") returns "3", provided there is a string {maxNumberOfReopenings=3} in the description of project with key "CRM".
projectPropertyExists(string property_name) : boolean
Available since version 2.2
Returns true only if there is a project property with name property_name in current issue's project, i.e., if project's description contains a string like {property_name=value}.
Example: projectPropertyExists("maxNumberOfReopenings") returns true only if there is a string like {maxNumberOfReopenings=x} in the description of current issue's project.
projectPropertyExists(string property_name, string project_key) : boolean
Available since version 2.2
Returns true only if there is a project property with name property_name in project with key project_key.
Example: projectPropertyExists("maxNumberOfReopenings", "CRM") returns true only if there is a string like {maxNumberOfReopenings=x} in the description of project with key "CRM".


The parser is a common feature, making Project Properties available in the main features of the plugin:



Usage Examples

Incoming Links
labelsexample