Hi Community,
I am pulling my har out with this one... undoubtedly due to my lack of coding knowledge!
I have a field "RAID Type". I want different fields to be presented and hidden based on what is selected.
For example if "Issue" is selected present these fields and hide these ones.
The trouble begins when i create multiple behaviours and serverside scripts.
For example i create another behaviour to say when "Risk" is selected the present these fields and hide these ones.
It seems to get confused and the first behaviour set seems to malfunction.
Should this behaviour all be in one script and if so how do i do it?
Below is an example of the code for a single behaviour that works fine. Its just when i start adding multiple behaviours that the malfunctions start.
Please please could anyone help?
Thanks in advance.
def EscalationLevelField = getFieldByName("Escalation Level")
def ResponsePlanField = getFieldByName("Response Plan")
def ImpactScoreField = getFieldByName("Impact Score")
def ResolutionDateField = getFieldByName("Resolution Date")
def MitigationPlanField = getFieldByName("Mitigation Plan")
def TargetResolutionDateField = getFieldByName("Target Resolution Date")
def DecisionRequiredByField = getFieldByName("Decision Required By")
def ProbabilityField = getFieldByName("Probability")
def RAIDtypeField = getFieldById(getFieldChanged())
def selectedOption = RAIDtypeField.getValue() as String
def isOtherSelected = selectedOption == "Issue"
TargetResolutionDateField.setHidden(! isOtherSelected)
TargetResolutionDateField.setRequired(isOtherSelected)
ResponsePlanField.setHidden(! isOtherSelected)
ResponsePlanField.setRequired(isOtherSelected)
EscalationLevelField.setHidden(! isOtherSelected)
EscalationLevelField.setRequired(isOtherSelected)
ResolutionDateField.setHidden(! isOtherSelected)
ResolutionDateField.setHidden(isOtherSelected)
ImpactScoreField.setHidden(! isOtherSelected)
ImpactScoreField.setRequired(isOtherSelected)
MitigationPlanField.setHidden(! isOtherSelected)
MitigationPlanField.setRequired(isOtherSelected)
DecisionRequiredByField.setHidden(! isOtherSelected)
DecisionRequiredByField.setRequired(isOtherSelected)
ProbabilityField.setHidden(! isOtherSelected)
ProbabilityField.setHidden(isOtherSelected)
Hello @Darren Fairweather
Welcome to the community.
When you create your behaviors is each set of rules specific to an issue type? Are you creating a mapping for the behaviour to apply it to specific project(s) and issuetype(s)?
How does the "malfunction" manifest? What steps are you executing before the malfunction happens?
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.