Hi All,
In Jira cloud I have two custom fields with dropdown yes or no values.
If I select Yes in any of the fields then other three custom fields should become required.
I need this to be done in create screen while creating a ticket.
We are using script runner pulgin in our instance and required specific groovy script for the above requirement.
Thanks in Advance.
Hi @Koushik , welcome to the Atlassian Community and thanks for your question.
I tagged this post with some useful tags for Adaptavist, who make ScriptRunner, and for Behaviours, which is what I think you will need to use to achieve this.
I would typically refer to the documentation for how to get started here - https://docs.adaptavist.com/sr4jc/latest/features/behaviours/create-and-edit-behaviours
Furthermore, Adaptavist has a script library available where you can search to find if there is already a script that you could use as-is or modify to your use case. Please check here - https://library.adaptavist.com/search?library-content%5BrefinementList%5D%5Bapp_pretty_names%5D%5B0%5D=ScriptRunner%20for%20Jira&library-content%5BrefinementList%5D%5Bplatforms%5D%5B0%5D=cloud&library-content%5BrefinementList%5D%5Bfeature_names%5D%5B0%5D=behaviours
How we generally work in the community is that we are offering advice or support, not necessarily to write the entire thing for you, as that would generally be considered paid consultancy.
If you can show a bit what you are working on and towards, we will try to help you to achieve it, not necessarily to do it for you.
Hope this helps you.
Cheers
Hi Koushik,
We have the example located here which shows how to make a field required when a value is selected in a Select List field.
You will be able to modify this example to achieve your requirement of making your three fields required when Yes is selected in your drop-down fields.
To achieve your requirement you would want to have the isRequired Variable twice with different names where each variable checks one of your dropdown fields to see if it has the value yes.
You would then copy the statement at the bottom of the script that makes the field required and have one statement for each field if either of the isRequired variables is true.
I hope this helps.
Regards,
Kristian
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.