🚀 JWT 3.0 is out 🚀 

The app was completely overhauled, and so was the documentation: Jira Workflow Toolbox (Server/Data Center) Home

The page you are viewing is still valid for all app versions prior to 3.0.

On this page


Features used to implement the example



Example: Set a field based on reporter's email

The customer field Defect Type is a drop down with the values: None, Production Defect and Development Defect. Production Defect is the default value. I have the problem with the default value in place and when it is removed. I want the Defect Type to change during the creation transition to Development defect is the Reporter's Email address matches an @gmail.com (for example) email address. Below is the Post Function I tried. I have also tried it with the values of Production Defect and Development Defect instead of 1 and 2.

Post Function on the Create initial transition.
The field Defect Type will be set according to the evaluation of Reporter's email against the following set of rules:
(@gmail.com)2
(.)1

You should write a valid regular expression in the first part of the rule (the part in brackets) and then the literal value of the option you want to select. You only need a rule to change the value when Reporter's email matches a "gmail.com" address. In any other case default value rules. See the screenshots:


Once configured:




Other examples of that function

Related Usage Examples