Alert Engine (Escalation Service) User Guide
The Alert Engine (Escalation Service) in ScriptFabric empowers Jira Administrators to automate recurring batch operations across work items matching targeted JQL queries.
Core Capabilities
- JQL Query Filtering: Select target work items using standard Jira Query Language (e.g.,
project = DEMO AND status = "In Progress" AND updated <= -7d). - Batch Processing Engine: Automatically iterate over matching issues and execute your custom JavaScript or TypeScript logic for each item.
- Flexible Schedule Types: Choose between
Interval,Weekly,Monthly, orCron / Advancedschedule expressions. - Timezone Aware: Configure schedule execution in UTC or localized timezones.
- Execution Modes: Run as App User (elevated system permissions) or Current User (caller scope).
- Dry Run & Match Preview: Test JQL expressions and preview matched issues before enabling active schedules.
Schedule Frequencies & Cron Syntax
| Schedule Type | Configuration | Example / Syntax |
|---|---|---|
| Interval | Repeat every N minutes / hours | Every 15 minutes, Every 2 hours |
| Weekly | Run on specific days of the week at a set time | Mondays & Thursdays at 09:00 AM |
| Monthly | Run on specific days of the month | 1st day of the month, 15th day of the month |
| Cron / Advanced | Standard 5-part cron syntax with business day flags | 0 9 * * 1-5 (Mon-Fri 9:00 AM)0 18 L * ? (Last day of month at 6:00 PM)0 8 1W * ? (Nearest weekday to 1st of month) |
Cron Quick Presets
0 0 * * *— Every night at midnight0 9 * * 1-5— Mon-Fri at 9:00 AM0 12 1 * *— 1st of every month at 12:00 PM0 18 L * ?— Last day of the month at 6:00 PM
Creating an Alert Engine Rule
- Open Apps → ScriptFabric in Jira Cloud.
- Select Alert Engine from the sidebar menu.
- Click Create Rule.
- Configure rule parameters:
- Rule Name: A unique descriptive title.
- JQL Query: Specify the issue filter query.
- Schedule Type: Select
Interval,Weekly,Monthly, orCron / Advanced. - Run As: Select
App UserorCurrent User.
- Enter your automation script in the Monaco code editor.
- Click Save & Enable.
Injected Script Context
Inside an Escalation script, ScriptFabric injects:
issue: Target work item object (key,summary,status,assignee, etc.).logger: Logging utility (logger.info(),logger.warn(),logger.error()).WorkItems: Canarys HAPI for work item updates (WorkItems.transition(),WorkItems.addComment()).getVariable(key): Access encrypted Script Variables.
// Example: Auto-close inactive issues with a reminder comment
if (issue.assignee) {
await WorkItems.addComment(issue.key, `Hi @${issue.assignee.displayName}, this issue is flagged for inactivity.`);
logger.info(`Notified assignee for ${issue.key}`);
}