Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column
width30%
Panel
borderColor#333f48
bgColor#FFFFFF
titleColor#eeeeee
borderWidth1
titleBGColor#333f48
borderStylesolid
titleOn this page

Table of Contents
maxLevel1

Column



Features used to implement the example



Example: Setting a field's default value depending on another field

Can the Jira Workflow Toolbox plugin set a default value based on the contents of a field? For example, I have a custom field called Billable which is a checkbox. I would like to set this field to 'selected' if the issue type is 'Change Request' and set this field to 'unselected' if the issue type is 'Defect'.

It's possible to do it easily using post-function Set a field as a function of other fields, but there is something I don't understand in your example: I can't find any type "Checkbox" for custom fields in Jira. There is a custom field type: "Multicheckbox" but it doesn't seem to be suitable for your example since if you have options "Yes" and "No" you could check both options at the same time. I find more suitable for your example custom field types "Radio button" or "Select List". 

Let's suppose a field "Billable" of type "Select List" with two options "Yes" and "No". In this case you need to add to transition "Create Issue" a post-function Set a field as a function of other fields configured as shown n the following screenshot:


Text to be parsed is:

(New Feature)Yes

(.*)No


Once configured, post-functions configuration for transition "Create Issue" looks like this:




Other examples of that function

Incoming Links
pageSet a field as a function of other fields
labelsexample

Related Usage Examples

Content by Label
showSpacefalse
cqllabel = "example" and label = "custom-field"