We have a requirement for a calendar mashup from events on other calendars. Wiki Page real estate is important. We only want to display 3 weeks at a time -1, 0, +1. Where -1 is last week, 0 is current week, and +1 is next week. 1.) Can this be done, and 2. What tool would you use to customize? Thanks!
Hi @IDO GAFSON
It's not possible to directly set the Child List in the Cascading List to required using ScriptRunner's Behaviour.
However, you can add an error message Cascading List which will function like a validator to ensure that the Child List's value is set before the issue can be created.
Below is a sample working code for your reference:-
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours behaviours
def cascade = getFieldById(fieldChanged)
def cascadeValue = cascade.value as List
cascade.required = true
cascade.clearError()
if (cascadeValue.size() < 2) {
cascade.setError('Child List Must Be Selected')
}
Please note that the working sample code above is not 100% exact to your environment. Hence, you will need to make the required modifications.
Below is a screenshot of the Server-Side Behaviour configuration:-
Below are a couple of test screenshots for your reference:-
1. When the Creat dialog is first loaded, the Cascading List will return an error message as no value has been set, as shown in the image below:-
2. If only the parent value of the Cascading List is selected, as expected, the error message will not be removed as shown in the screenshot below:-
3. Only once the parent and child list options are selected from the Cascading List, will the error message be removed as shown in the screenshot below:-
I hope this helps to solve your question. :-)
Thank you and Kind regards,
Ram
Hi @IDO GAFSON
Has your question been answered?
If yes, please accept the answer.
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it's solve half of my problem
If i create a new story its work fine
but if I create story from epic the cascad field inharit the values from the linked epic
and then the story get the valus and filld the field but i get the error that the child not filld until i change him to somting else
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ram Kumar Aravindakshan _Adaptavist_
Hi!
Thank you for answer !
It's helpful!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.