Switching and Toggling

Update The Value of a Custom Field Based on Another

This is an example for changing the value of a text field based on user input. For full documentation, please see this page on configuring Live Fields.

Main Script

Note that lfInstantHook() is necessary when running this script from the create view.

lfInstantHook("issueType", "LiveFields/hook.sil"); lfWatch("issueType", "issueType", "LiveFields/hook.sil");

Note that there are no forward slashes at the beginning of a relative path. Dot slash notation “./” is not supported.

Hook Script

if (argv["issueType"] == "Task") {     lfSet("textField", "This issue is a Task"); } else if (argv["issueType"] == "Bug") {     lfSet("textField", "This issue is a Bug"); }

 

Hiding and Disabling Custom Fields Based on Selection

Main Script

lfInstantHook("issueType", "LiveFields/hook.sil"); lfWatch("issueType", "issueType", "LiveFields/hook.sil");

Hook Script

 

 

Additional Help

Need help implementing this script? Talk to me directly to me by clicking on the bot on this page.

Related articles

Filter by label

There are no items with the selected labels at this time.