Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a field required on selection of a value in another field.

rupa_srivastava May 13, 2020

I have added a field with Yes and No options and need detailed notes when Yes option is selected. 
Can i make Notes field required when Yes is selected for the other field?

3 answers

0 votes
Pavel Adamovich
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2020

Hi @rupa_srivastava .

You can't do this with a standart Jira functional. We've used Extension for Jira Cloud addon for this purpose https://marketplace.atlassian.com/apps/1212161/extension-for-jira-service-desk?hosting=cloud&tab=overview

0 votes
michael.mandel May 13, 2020

Hey @rupa_srivastava 

I don't think what you're asking for is possible without an add-on, but one way you could approach this is instead of having the Yes/No field option on the transition screen, you can make 2 transitions, one Yes and one No transition, then on the Yes transition make that Notes field required.

Another options is to just make the notes field always required, and have instructions along the lines of "If no, then put N/A in the notes field"

0 votes
Jonas Moehringer - ij-solutions
Atlassian Partner
May 13, 2020

Hi,

on Jira Server we are using Dynamic Forms for such purposes. But unfortunately it is not available for Jira Cloud. 

It is also possible by adding some frontend JavaScript. I did that some time ago with Script Fragments from Scriptrunner. As far as I know this is also available in Jira Cloud. But I am not sure if that works.

Kristian Walker _Adaptavist_
Community Champion
May 13, 2020

Hi Rupa,

Thank you for question.

I can confirm that it is not possible to achieve your requirement of displaying a notes field when the Yes value is selected in another custom field with ScriptRunner for Jira Cloud.

The reason for this is due to the fact that the plugin is unable to perform any dynamic validation on issue forms to link or hide fields like the server version can with the Behaviors feature.

Also I can confirm that the plugin cannot dynamically populate field values like it can in the server version can with the Behaviors feature.

The reason we are unable to provide this functionality is due to the restricted functionality and API's which Atlassian provide inside JIRA Cloud, due to the fact that Atlassian only provide a Rest API in Jira Cloud and not the same Java API that the server version contains.

You can see more detailed information on the differences between ScriptRunner for JIRA Cloud and ScriptRunner for JIRA Server inside of the documentation page located here.

Also, I can confirm that it is not possible to achieve the requirement using Script Fragments inside of Jira Cloud as it is not permitted to run javaScript on the Jira pages inside of Jira Cloud like you can do in Jira Server as atlassian do not permit javaScript to be run inside of Jira Cloud.

I hope this information helps.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events