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

Show / Hide fields based on other Field drop down values on Customer Portal

PF March 22, 2024

How to embed js in the JSM create request page.

 

After implementing the input summary field,

Description fields can be hidden.

3 answers

2 votes
Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2024

Hi @xiongpanfeng 

 

By default JSM don't have option like you described. To do that you need additional app like Script runner and built-in behaviours features.

 

Regards,

Seba

PF March 24, 2024

Hi @Sebastian Krzewiński 

Thank you for your recommendation.

   I want to write my own simple plug-in to deal with this problem, Can you help guide me?

 

thanks,

xiongpanfeng

Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 25, 2024

I don't have that much experience with that. 

Here you can find details about developing apps - https://developer.atlassian.com/platform/marketplace/developing-apps-for-atlassian-data-center-products/

 

Regards,

Seba

1 vote
Anna Hryhoruk _Appfire_
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.
March 22, 2024

Hello @xiongpanfeng ,

I would be glad to share a simple example of how this can be done using Power Scripts 

You need 2 sil scripts (main and hook) + add Live Field configuration. 

lf_main_jsd.sil 

lfInstantHook({"summary"}, "lf_hook_jsd.sil");
lfWatch("summary", {"summary"}, "lf_hook_jsd.sil");

 lf_hook_jsd.sil

if (argv["summary"] != ""){
lfHide("description");


} else {
lfShow("description");

}

Also, you can add to the hook script an extra condition to check on which screen you are going to apply it , but you can also limit where the script will be used in Live Fields Configuration: 2024-03-22 13 57 53.png

So, here is the result: 

LF.gif

 

As you can see, it is quite simple. But since I don`t know if you have sil scripting experience, I will add here some helpful documentation links: Live Fields, Live Fields Routines, and some examples Switching and Toggling, Validating Custom Fields

Hope it helps!
Anna

PF March 24, 2024

Hi @Anna Hryhoruk _Appfire_ 
   

Thank you for your recommendation.

   I want to write my own simple plug-in to deal with this problem, Can you help guide me?

 

thanks,

xiongpanfeng

Anna Hryhoruk _Appfire_
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.
March 25, 2024

Actually, SIL scripting language (the one that Power Scripts uses as a key engine) allows users to create their own plugins. Please check this documentation page for more details: Development using SIL , Tutorial

Best regards,
Anna

1 vote
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2024

Hi @xiongpanfeng 

This isn't natively available - but Apps will enable you to do this - either...

Ste

PF March 24, 2024

Hi Stephen Wright _Elabor8_

   Thank you for your recommendation.

   I want to write my own simple plug-in to deal with this problem, Can you help guide me?

 

thanks
  

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
5.12.2
TAGS
AUG Leaders

Atlassian Community Events