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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

66 views 0 5
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