Understanding listener script context
This reference helps you understand what data your listener scripts can access and which functions to use based on whether your script runs in Issue context or Global context.
When your listener script executes, it receives specific parameters and has access to different functions and data depending on the event type. In other words, it operates within different contexts that determine what data and functions are available. The available context varies between issue-related events and global events.
Issue context: Your script can directly access issue fields like summary, assignee, and custom fields. This is available for issue-related event types (Issue, Issue comments, Issue links, and Attachments).
Global context: Your script cannot directly access issue fields and must use special event functions instead. Available for non-issue events (Project, Version, User, Sprint, Board, Filter).
For details about contexts and scope, see Contexts and scope in SIL.
Script parameters
Every listener script automatically receives these parameters when it executes:
Position | Parameter | Description |
|---|---|---|
0 |
| The user who triggered the event. |
1 |
| Internal event identifier. |
2 |
| Name of the triggered event. |
These parameters provide essential information about the event that triggered your listener, including who caused it and what type of event occurred. This information is often needed for logging, conditional logic, or determining how your script should respond.
You can retrieve this information in your script with:
string callingUser = argv[0];
string eventId = argv[1];
string eventName = argv[2];Available functions by event type
The data and functions available in your script depend on the event type and whether it provides Issue context. This determines not only what information you can access, but also how you access it: through direct field references or through specific event functions.
When your listener operates in Issue context, you can directly access all standard issue variables (summary, assignee, description, etc.) in your script. However, when operating in Global context, using issue variables will cause errors, and you must use event-specific functions instead.
Event type | Events | Context | Supported functions |
|---|---|---|---|
Attachment |
| Issue |
|
Issue |
| Issue |
|
| Issue |
| |
Issue comments |
| Issue |
|
Issue links |
| Issue |
|
Project |
| Global |
|
Version |
| Global |
|
User |
| Global |
|
Boards |
| Global |
|
Filters |
| Global |
|
Sprint |
| Global |
|
See the Listener functions page for details and examples.
Need support? Create a request with our support team.
Copyright © 2005 - 2025 Appfire | All rights reserved.
