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

Show/Hide custom fields based on Message Type field in JIRA data-center

Digvijay Singh Gehlot August 16, 2024

Hi Community,

I have a typical requirement, where I want to show/ hide the custom fields based on the Message Type field in Issue Edit Screen in JIRA data center.

Existing configuration:

  • I have created a Message Type field and passing an HTML + Javascript code in "Edit Default Value"
  • In the HTML+Javascript code, I am using a Checkbox
  • When Checkbox is enabled, it displays the value and if it is disabled, the value is hidden within the Message content.

My requirement is:

  • When a user enables the Checkbox (present in Message Type field), the set of custom fields should appear below the Message field.
  • When the user disables the Checkbox (present in Message Type field), the set of custom fields should hide. 
  • Is there a way to add Expand/Collapse option in Edit Screen? 

Please guide me on how I can call the Checkbox ID (present in Message Type field) and then show/ hide the custom fields based on the action taken on the Checkbox in Edit Screen - by using Scriptrunner behavior/ fragments, JSU, JMWE app, any post-functions?

Thanks 

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Ram Kumar Aravindakshan _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 23, 2024

Hi @Digvijay Singh Gehlot

In your description, you mentioned:

I have a typical requirement, where I want to show/ hide the custom fields based on the Message Type field in Issue Edit Screen in JIRA data center.

What field are you referring to when you mentioned the Message Type field? Is it a Multi-Line Text field or is this from another third-party plugin?

I am looking forward to your feedback and clarification.

Thank you and Kind regards,

Ram

Digvijay Singh Gehlot August 28, 2024

@Ram Kumar Aravindakshan _Adaptavist_ 

Thank you for your message.

I am using a Message Type field and in it's Default Value, I am using HTML code where I am showing a checkbox within the code.

On Edit Issue Screen and below that Message Type field, I am showing (JIRA) Multi-Line Text field.

I want to know, is there a possibility that, if a User enables the Checkbox (present in Message Type field), then the below Multi-Line Text field should appear.

If that Checkbox is disabled (present in Message Type field), then the Multi-Line field should disappear.

I hope I am able to provide more clarity to my use-case.

Let me know if you need any further details.

Thanks.

TAGS
AUG Leaders

Atlassian Community Events