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.
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
Hi:
I want to know if the field is at one transition screen or at create issue screen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.