Skip to end of banner
Go to start of banner

lfWatch (Power Scripts)

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Description

Attaches listeners for the events that you give as parameters in the function. If you don't give any event, 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

Return Type

None

Example

For the scriptPath parameter you can either give the relative path (as in the example above), or the absolute path:
C:/Program Files/Atlassian/Application Data/JIRA/silprograms/hook.sil.

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

Every time when the keyup event is triggered, the hook.sil is executed. When the Summary field contains the word ?important?, the Priority field is set to "Highest" and a message is displayed for the priority fie

//hook.sil : 
 if (contains(argv["summary"], "important")) {
    lfSet("priority", "Highest");
    lfShowFieldMessage("priority", "Priority changed", "INFO");
}

See also

We've encountered an issue exporting this macro. Please try exporting this page again later.
  • No labels