Info | ||
---|---|---|
| ||
This routine is available starting with
|
Syntax
lfWatch(field, relatedFields, scriptPath[,javaScriptEvents]);
...
Excerpt |
---|
Attaches listeners for the events that you give as parameters in the function. |
If you don’t specify give any eventsevent, this routine attaches listeners to the “change” event which is triggered when the issue is updated. Every time when the event is triggered, the SIL ™ script from scriptPath parameter runs. This SIL ™ script receives the values for the relatedFields parameter and you can use them as: argv["field"].
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
field | String | Yes | Field to listen to |
relatedFields | Array String | Yes | Dependent fields required for the given field (needed only if you get the field's values from the screen like this: argv["field"]) |
scriptPath | String | Yes | Script source to run when the event is triggered |
javaScriptEvents | Array | No | Events to listen to. It's any JavaScript event (check this list for example).Starting with SIL Engine™ v 4.1.1, you can also listen to the following Jira events: inlineEditSaveComplete, newContentAdded, issueRefreshed which refer to the inline editing on the view issue screen Jira UI events. |
Warning | ||
---|---|---|
| ||
When using the "change" event on a "labels type" field (fixVersions, 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 "focusing" event closely matches the behavior expected for the "change" event. |
...