def DJ = getFieldById("customfield_10702")
def TC = getFieldById("customfield_10809")
def TJ = getFieldById("customfield_10703")
def CR = getFieldById("customfield_10700")
def DI = getFieldById("customfield_10500")
if (s == "Duplicate defect" )
{
TC.setHidden(true)
DJ.setHidden(true)
TJ.setHidden(true)
CR.setHidden(true)
DI.setHidden(false)
DJ.setRequired(false)
CR.setRequired(false)
TC.setRequired(false)
TJ.setRequired(false)
DI.setRequired(true)
}
Here is the condition I am checking but getting Error "Please enter the value for the field"
Even if I choose the issue and test the field showing above mentioned error.
Please help in the scenario.
What have you actually configured for the Behaviour, and where is the rest of the script?
Thanks for your quick reply.
We have select list and base on the value of select list issue picker field will appear which is made required.
But when I select value in select list and issue in issue picker field and clicked on trasition then the error like "Please enter the value for the field" is getting appear.
We have checked by logging whether the issue picker is getting value or not but its getting value in field but it is not working for us.
Please have a look in to it.
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please find the exact functionality we are trying to achieve through this behaviour:
The Behaviour is mapped to relevant project / issue type
The problem we are facing is --> When the transition is executed and the value of the field "S" is selected as "Duplicate defect," the field "DI" is displayed on the transition screen and marked as required. We enter the issue key on the "DI" field and click on the transition button --> the error message "You must enter a value for this field" is displayed below the "DI" field.
The entire script is provided below for reference:
def s = getFieldById("customfield_10701").getValue()
def DJ = getFieldById("customfield_10702")
def TC = getFieldById("customfield_10809")
def TJ = getFieldById("customfield_10703")
def CR = getFieldById("customfield_10700")
def DI = getFieldById("customfield_11300")
if (s == "Not a defect")
{
DJ.setHidden(false)
DJ.setRequired(true)
CR.setRequired(false)
TC.setRequired(false)
TJ.setRequired(false)
DI.setRequired(false)
TC.setHidden(true)
TJ.setHidden(true)
CR.setHidden(true)
DI.setHidden(true)
}
else if (s == "Clarification Requested"){
CR.setHidden(false)
CR.setRequired(true)
TC.setRequired(false)
TJ.setRequired(false)
DJ.setRequired(false)
DI.setRequired(false)
DJ.setHidden(true)
TC.setHidden(true)
TJ.setHidden(true)
DI.setHidden(true)
DJ.setRequired(false)
}
else if (s == "Duplicate defect" ){
TC.setHidden(true)
DJ.setHidden(true)
TJ.setHidden(true)
CR.setHidden(true)
DI.setHidden(false)
DJ.setRequired(false)
CR.setRequired(false)
TC.setRequired(false)
TJ.setRequired(false)
DI.setRequired(true)
}
else if (s == null ){
TC.setHidden(true)
DJ.setHidden(true)
TJ.setHidden(true)
CR.setHidden(true)
DI.setHidden(true)
DJ.setRequired(false)
CR.setRequired(false)
TC.setRequired(false)
TJ.setRequired(false)
DI.setRequired(false)
}
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.