Greetings Team,
We have a Multiselect field with value option 'Create' and a Multiline text field. I am setting Multiline text field as required when value on Multiselect field choosed as 'Create'. I was able to get it working on behaviours only when new transition option is enabled on profile setting which is downside as educate this enabled to end users is being challenge.
So, I am looking to get this using workflow validators using scriptrunner for Jira cloud using Jira expression. However, expression is able to validate only text field not the multiselect field.
Tried with below expression, sets text field as required in all scenarios
let plainTextValue = value => typeof value == 'Map' ? new RichText(value).plainText : value ; issue.customfield_13622.value == 'Create' ? plainTextValue(issue.customfield_13272 != null) && plainTextValue(issue.customfield_13272) != '' : true
Below one, doesn't recognize the value on the text field and sets as required even we have text entered, with select value as Create
issue.customfield_13622 == null || (issue.customfield_13622.value == 'Create' && (plainTextValue(issue.customfield_13272 != null) && plainTextValue(issue.customfield_13272) != '')) //customfield_13622 = Multiselect field with value 'Create' //customfield_13272 = Multiline text field
Any help would be appreciated.
In your description, you mentioned:
I am setting Multiline text field as required when value on Multiselect field choosed as 'Create'. I was able to get it working on behaviours only when new transition option is enabled on profile setting which is downside as educate this enabled to end users is being challenge.
So, I am looking to get this using workflow validators using scriptrunner for Jira cloud using Jira expression. However, expression is able to validate only text field not the multiselect field.
Setting a field to required is only doable via Behaviour.
You could however use the Validator to return an error message if the field value is not included. Something like:-
issue.customfield_13622 != null
I hope this helps to solve your question. :-)
Thank you and Kind regards,
Ram
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.