Hi,
I am trying to implement lfwatch on a radio button to show or hide another field based on selected value... on live field main configuration I have below code
lfWatch("customfield_15800", {"customfield_15800"}, "OnChangeCustomField.sil", {"change"});
and OnChangeCustomfield.sil
switch(customfield_15800){
case "Normal Change":
lfShow("customfield_15900");
lfShow("customfield_15901");
lfHide("customfield_15904");
break;
case "Emergency Change":
lfHide("customfield_15900");
lfHide("customfield_15901");
lfShow("customfield_15904");
break;
}
How to correctly implement lfWatch on a field my code is not working.
Thanks,
Dennis
Hello,
Your OnChangeCustomfield.sil should look like this:
switch(argv["customfield_15800"]){
case "Normal Change":
lfShow("customfield_15900");
lfShow("customfield_15901");
lfHide("customfield_15904");
break;
case "Emergency Change":
lfHide("customfield_15900");
lfHide("customfield_15901");
lfShow("customfield_15904");
break;
}
If you want to get a value of a field on a screen, then you should use the argv list to do it. It would be like this:
argv["customfield_15800"]
If you type customfield_15800, it takes a value saved in the Jira database, which is not what you want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe scripts don’t work of fields as they used to.
You can look at the addons,
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is an answer with scriptrunner: https://community.atlassian.com/t5/Jira-Core-questions/Script-Runner-Behaviours-Hide-Show-based-on-checkbox-selection/qaq-p/306754
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.