how to make a custom field mandatory based on value of another custom field on Jira cloud

Test Account May 28, 2021

I have one custom field customfield_10046, which has two options Yes & No, if selected Yes, only then the other field customfield_10047 should be mandatory, if selected No, it can be Optional.

How to achieve this on Jira cloud? I have seen many answers in this forum using Script Runner, but nothing works out. Kindly help me out

4 answers

2 accepted

5 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 28, 2021

Hi Sangeetha,

The ScriptRunner Behaviours tool that can accomplish this is only available on the Jira Server version. There is currently no way to do this in the Cloud. 

2 votes
Answer accepted
Kate Kabir
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 30, 2021

HI @Test Account 

Thank you for the question. 

I can confirm that the ScriptRunner for JIRA Cloud plugin is unable to make a custom field mandatory based on the value of another custom field as 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. We do not have an alternative way to configure this in the cloud.

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 provides a Rest API in Jira Cloud and not the same Java API that the server version contains.

However, You may vote for a Feature Request on this at, https://scriptrunner-for-jira-cloud.nolt.io/4  if you are interested.

Thank you. 

Kind Regards

Kate

Albert Diaz June 23, 2023

Hi @Kate Kabir, has this changed at all?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 23, 2023

@Albert Diaz 

The Behaviours app was released at the end of 2022 and has had several subsequent updates to enhance functionality.

You can review the documentation here.

While the documentation does indicate it can be used to make a field mandatory, I have not read far enough nor experimented with it to determine if that can be done based on the value of another field.

Like Taranjeet Singh likes this
Albert Diaz June 23, 2023

@Trudy Claspill

Thanks for the info! So apparently the Behavioral scrips do function in the cloud for Jira Software. They do not, however, function on Jira Work Management or Service Management... according to Adaptavists' documentation.

Wish I would've read that sooner before I spent a few hours trying to figure out why my script which was perfectly fine wasn't working on my Service project hahaha

Like # people like this
2 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 28, 2021

Do you have Scriptrunner installed on your instance?

Which posts have you tried to follow?

0 votes
khalid June 21, 2023

hi, if your project type is "service"

then this will help you

go to your project-project setting and choose dynamic forms

then you can choose for example the cascading field and the mandatory field "required".

Jarosław Solecki _Deviniti_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 21, 2023

@khalid @Test Account 
Since the original post, there were some changes in Jira API and our team created a Cloud version of Dynamic Forms for Jira which resolves the problem with conditional setting the field as required based on the value of other fields. It comes with a few additional features like Set Value, Default Value for native fields and Fields Visibility. It works for company-managed Software projects right now. 

Suggest an answer

Log in or Sign up to answer