Conditionally showing fields

Rana Ahmed July 22, 2020

Hi,

Is it possible to conditionally show / hide fields in a form.

e.g. 

There is a field named priority

When the user select the priority to HIGH, another field (e.g Reason) should be shown to user which he has to fill. When the priority is not HIGH then this field should remain hidden and empty

Similarly, can the same be done for setting the input type of field. e.g. when the priority is HIGH set another field to be required.

Can some one kindly, point me in right direction.

 

4 answers

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.
July 27, 2020

Hi Rana,

I can confirm that unfortunately that is not possible to achieve you requirements with the ScriptRunner for Jira Cloud plugin.

The reason for this is 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.

I hope this information helps.

Regards,

Kristian

1 vote
Trevan Householder_Isos-Tech-Consulting_
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.
July 22, 2020

@Rana Ahmed Yes, this can be done with the app Extension for Jira Service Desk.  Super easy to accomplish with this app but not available natively.

Rana Ahmed July 25, 2020

This seems to work only for customer forms. Not on the forms which the agent uses. E.g. when an agent clicks create button. The form does not work dynamically

0 votes
naim.yilmaz September 23, 2021

Hello @Rana Ahmed , Hello everybody,

Did you solve this problem? I need a similar structure. 

when I select the Value "Yes" from "Merge Need" field (single select), "Merge Need Detail (Multiple select field) should be see.

when I select the Value "No" from "Merge Need" field (single select), "Merge Need Detail (Multiple select field) should not be see.

 image.png

0 votes
Jorden Van Bogaert
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.
July 22, 2020

Hi @Rana Ahmed 

I don't think this is possible by default. Perhaps with an add-on, but I don't know any.

Adaptavist ScriptRunner has this feature for data center/server deployments of Jira, but that specific feature is currently not available in Cloud.

Kind regards
Jorden

Suggest an answer

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

Atlassian Community Events