Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Show/Hide Fields Based on Other Field Values

andy.pawl
Contributor
August 26, 2020

So I've done this on Server - I believe with Behaviors. Wondering if it's possible with something like ScriptRunner in CLOUD. I want to be able to hide or show field on a JIRA Create Screen based on a prior fields value. In the example below, Work Being Done sets the field selection thereafter...

Ex.

1. User selects field Environment = "Confluence"

2. User selects field Work Being Done = "New Space Request"

The Create Screen should then only show fields that pertain to creating a New Space such as Type of Space, User Access and so on.

In this case I want to hide any fields related to a Plugin Request, Enhancemnet or Integration for example.

Thanks

AP

 

4 answers

Suggest an answer

Log in or Sign up to answer
1 vote
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 27, 2020

Hi Andy,

Thank you for your question.

I can confirm that the ScriptRunner for JIRA Cloud 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.

I hope this information helps.

Regards,

Kristian

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

The lack of user context on the Create screens is really annoying. We resolved that with  Dynamic Forms for Jira which is quite easier to use than ScriptRunner, as you don't have to write a single line of code. Moreover, you also gain some additional abilities next to show/hide fields conditionally like the Set Default Value, the Set Value based on condition, and make fields required or read-only

If you have any questions or would like to have a demo session just book it here.

Rompicherla Kalyani
Contributor
March 12, 2024

Hi @Jarosław Solecki _Deviniti_ 

 

Can we make use of this plugin (Dynamic Forms for Jira) for JWM project as well?
I have the similar kind of requirement for one of the JWM projects.

There is a simple yes or No select list, if yes is selected, we should show another fields.

If "No" is selected, no need to show any new fields.

Please note that there is no customer portal available for this project.

We just use the Create button for creating this tickets.

Appreciate your response.

 

Thanks,

Kalyani.

Jarosław Solecki _Deviniti_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 13, 2024

Currently, it is not available in JWM. I encourage you to raise a request for that as we are gathering interest in that kind of project. 



0 votes
Natasha Richardson
Contributor
April 20, 2022

Can confirm the form option works for this ability. Add your fields to the form and use sections to separate fields and set the conditional state on the section based on fields and its value.

0 votes
Simon H
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.
August 28, 2020

Andy, it is not directly on point as it is not done with ScriptRunner; however, ProForma (or ProForma Lite) allows you to show or hide fields using conditional logic, which should meet your needs. It works the same in Cloud or Server, and the ProForma Create Issue feature, with the ability to link directly to a form, has helped many organisations to work around the limitations of the Jira create screen.

The GIF below shows how conditional logic can work on a form (I made it for a slightly different question, but it seems relevant enough here).

Regards,

Simon

Multiple tables in a form.gif

Lina Massarwa December 23, 2020

Hi Simon,

How did you make this form?

Itai Avitan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 6, 2022

Question Referred to Cloud deployment type. 
ProForma does not support Jira Cloud.

Is there any other way to achieve this on cloud? 

Like Marieke likes this
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events