Versions Compared

Key

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

...

Info
titleAvailability

This routine is available since starting with 

JJUPIN
  • Power Scripts 2.5
  • katl-commons 2.5


Syntax

lfWatch(field, relatedFields, scriptPath[,javaScriptEvents]);

Description

Excerpt
Attach listeners for the events that you give as parameters in the function.

...

This SIL script receives the values for the relatedFields and you can use them as: argv[field].

Parameters

ParameterTypeRequiredDescription
fieldStringYesThe field to listen.
relatedFields

Array

String

YesThe dependent fields required for the given field.
scriptPathStringYesThe script source to run when the event is triggered.
javaScriptEventsArrayNoThe events to listen to. It's any JavaScript event (check this list for references)

...

Warning
title"change" event

 When using the "change" event on a "labels type" field (Fix Versions, Affected Versions, Labels, Components, etc.), the event will never trigger when a label is deleted, but only when labels are added. We have noticed that for these fields the "focusin" event closely matches the behavior expected for the "change" event.


Example

Code Block
lfWatch("summary", {"summary", "customfield_13706","components"}, " hook.sil", {"keyup"});
//where field = "summary";relatedFields = {"summary", "customfield_13706","components"};scriptPath = " hook.sil";javaScriptEvents = {"keyup"}

...

Info
titleInfo

For more information, see How Live Fields work.

See

...

also

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