The use of this routine requires the Power Scripts for Jira add-on be installed and licensed.
Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | lfInstantHook(relatedFields, scriptPath); | Package | | Alias | | Pkg Usage | | |
Description
Excerpt |
---|
|
Executes the given SIL script passing the screen values for the specified dependent fields. |
Executes the given SIL script passing the screen values for the specified dependent fields (relatedFields) as parameters to the script.
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
relatedFields | String Array | 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 | |
Return Type
None
Example
For the scriptPath parameter you can either give the relative path or the absolute path:
C:/Program Files/Atlassian/Application Data/JIRA/silprograms/hook.sil.
Code Block |
---|
lfInstantHook({"summary", "customfield_13706", "components"}, " hook.sil"); |
Every time when the initial script 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 will be displayed for the Priority field.
Code Block |
---|
// hook.sil
if (contains(argv["summary"], "important")) {
lfSet("priority", "Highest");
lfShowFieldMessage("priority", "Priority changed", "INFO");
} |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "lf_routine" and space = currentSpace ( ) |
---|
labels | array_routines |
---|
|