Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Version Picker Field on 0.5.3

AndreH
Contributor
April 1, 2013

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

0 votes
Darly Senecal-Baptiste
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2013

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

0 votes
Darly Senecal-Baptiste
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2013

Hi:

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events