Problem with Version Picker Field on 0.5.3

We are running Jira v.5.0.7 with Behaviours Plug-In v.0.5.0 in our production environment to have a Version Picker field conditionally required for only one project and optional for all others. This configuration works perfectly without issue. We are in the process of upgrading our production Jira to v.5.2.7 and have also include Behaviours latest version v.0.5.3. Under this latest version combination, the Behaviours plug-in ignores the configured Version Picker field as being required and lets the save occur without a value being provided. Please advise if there is a fix coming soon or work around in the meantime.

2 answers

Hi:

I want to know if the field is at one transition screen or at create issue screen

Hi:

Using Behavious for the versions that you mentioned work in terms of setting the Version Picker as required.

However in case that doesn't work, you can do the following behaviours script

import org.apache.log4j.Category
def Category log = Category.getInstance("log4j.category.com.onresolve.jira.groovy")
FormField cfcl = getFieldByName("Versions")
cfclv = cfcl.getValue()

if(cfclv == null)
{
  cfcl.setRequired(false)
}
else
{
  cfcl.setRequired(true)
}

I wondering to Jamie on why if a field is null the required is false.

Thanks

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

339 views 0 1
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you