Versions Compared

Key

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

Project Updated

To get a structure with the updated project, you can use the getProjectFromEvent routine.

User Created

To get a structure with the created user, you can use the getUserFromEvent routine.

User Updated

To get structures with the updated user, you can use the getUserFromEvent routine.

User Deleted

To get a structure with the deleted user, you can use the getUserFromEvent routine.
Excerpt
hiddentrue

Getting the issue context from SIL Listener events.

Arguments

Any script that processes an event will receive as parameters in the argv the following:

Position

Parameters

0

user - the calling user

1

eventId - the internal event id

2

eventName - the event name

You can always get this information directly in your script:

Code Block
string callingUser = argv[0];
string eventName = argv[2];

SIL Context. Extracting the information from event

As mentioned, context is determined through the event type.

Events

Context/Available routinesfunctions

Issue Created / Updated / Deleted

Issue context for create and update. You may use all issues variables

Additional supporting functions:

  • getEventName

For Issue Update event you may use the following routinesfunctions:

  • getEventIssueChanges

  • getEventIssueFieldChange

  • isIssueFieldChanged

For Issue Deleted - Global context. Using issue variables will error, since the issue is already deleted

Issue Commented / Issue Comment Added / Deleted

Issue context. You may use all issues variables

Additional supporting routinesfunctions:

  • getEventName

  • getIssueLinkFromEvent

Issue Link Added / Deleted

Issue context. You may use all issues variables

Additional supporting routinesfunctions:

  • getEventName

  • getIssueLinkFromEvent

Project Created / Updated / Deleted

Global context. Using issue variables will error

Additional supporting routinesfunctions:

  • getEventName

  • getProjectFromEvent

Version Created / Updated / Deleted / Released / Unreleased

Global context. Using issue variables will error

Additional supporting routinesfunctions:

  • getEventName

  • getVersionFromEvent

User Created / Updated / Deleted

Global context. Using issue variables will error

Additional supporting routinesfunctions:

  • getUserFromEvent

Also, the issue context (all standard variables and custom field values) will be set to those of the issue where the event was triggered from. For example, if a SIL script is triggered by an event launched from the "TST-123" issue, all standard variables and custom fields used in the SIL script will point to the "TST-123" issue, unless specified otherwise using the construction %otherIssueKey% variable.

Info

Info

To edit the actual scripts, use SIL™ Manager.

Aside from the issue events that are configurable from Jira UI, a SIL Listener also enables you to react to other events. Note that these events will not run in an issue context since they're not related to an issue, and it doesn't make sense using standard issue variables without qualifying them with the key of the issue. Additionally, each event might add additional information to the argv variable aside from the information that is common for all events.

The first three elements in the argv string array are (note that indexing in the array starts with 0):

  1. The user that triggered the event

  2. An internal id for the event that was triggered. Normally you wouldn't need this.

  3. The name of the event as specified in the dropdown list that configures the listener.

The next elements in the array after these are event-specific and are detailed in the following table.

See More

Child pages (Children Display)
pageSIL Listeners

Event

Additional Parameters

Notes

Version Created

Version Released

Version Unarchived

Version Unreleased

Version Updated

To get a structure with the updated version, you can use the getVersionFromEvent routine.

Version Deleted

4. version ID

5. empty (the version is already deleted at this point and details are no longer available)

To get a structure with the deleted version, you can use the getVersionFromEvent routine.

Project Created

4. project ID

5. string representation of a Project structure. You can retrieve this value and then cast it to a "Project" structure

To get a structure with the created project, you can use the getProjectFromEvent routine.

Project Deleted

4. project ID

5. project KEY (the project is already deleted at this point and details are no longer available)

To get a structure with the deleted project, you can use the getProjectFromEvent routine.

  • getEventName

  • getUserFromEvent

Contents:

Table of Contents

See also:

Child pages (Children Display)
pageSIL Listeners