Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

lfInstantHook(relatedFields, scriptPath);

Description

Excerpt
Executes the given SIL script, passing the screen values for the specified relatedFields as parameters to the script.

This is especially useful in the create issue screen, where you don't have access to the issue standard variables.

Using an instant hook, you can access in the hook script the screen values for the desired fields as argv[field].

Parameters

ParameterTypeRequiredDescription
relatedFields

String Array

YesThe dependent fields required for the given field.
scriptPathStringYesThe script source to run when the event is triggered.

Example

Code Block
lfInstantHook({"summary", "customfield_13706", "components"}, " hook.sil");

...

As we said before, the values from the relatedFields are accessed as argv[field]. For multiple values fields like components or affectedVersions the value returned is in the following format: val1|val2|val3. 


Info
titleInfo

For more information, see How 'Live Fields' work.

See Also:

Filter by label (Content by label)
max35
cqllabel = "live_fields_routines"