You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 2
Next »
The scripts written in the Simple Issue Language are designed to work with certain 'hooks' inside Jira. When one of the hooks is activated the script will run and in most cases, users will not even know this is happening. Depending on the type of hook being triggered the script will perform different types of tasks. For this reason, it is helpful to already know and understand some basic Jira concepts like custom fields, screens, workflows, etc.
Workflow Conditions/Validators: These scripts live in the workflow and are triggered BEFORE a workflow transition. The outcome of the script decides if the user can complete the transition and even if the user can select the transition as an option. The scripts can prevent users from performing actions if they are not permitted, add special security rules, validate input data, etc.
Workflow Post Functions:These scripts are triggered AFTER a workflow transition. Post Functions are the ideal place for adding actions that happen automatically like: creating sub-tasks, copying data from the parent, calculating field values, pushing data to a database, sending out custom notifications, etc.
Listeners: Listeners are a lot like post functions in that they happen AFTER a workflow transition. The difference is that listeners do not live within the workflow and can preside over multiple workflows simultaneously. Listeners can also be triggered by other, non-workflow actions like simply editing an issue. They can also be triggered by non-issue events like when a new user is created, a project or version is created, and many other events.
Live Fields: Live Fields is a name given to the scripts that can be triggered when a user simply views an issue, or when the user edits an issue or tries to create a new one. The scripts can control the fields on the issue screen thus making the screen 'fields' seem 'live' since they can be hidden, disabled, pre-populated, tied to other fields, and more actions specific to the screens themselves.
Scheduled Jobs: Some scripts don't need to be tied to a user event at all and may just need to run periodically. These scripts can be scheduled to run at time-specific intervals, daily, weekly, or even something complex like the first Tuesday of the month. The types of scripts that are run like this usually work with issues in bulk. For example, an escalation service to raise the priority of issues that have gone past the due date or a script that automatically assigns issues created that day.
JQL Functions: Like anything in life, sometimes the hardest part about Jira is being able to find what you are looking for when you need it. Jira has a lot of JQL functions to help but they don't always get the job done. Power Scripts has some prewritten JQL functions to help. It is also incredibly easy to create your own custom JQL functions.
Service Desk Automation - these scripts live right inside the native Service Desk automation. When creating custom automation rules the scripts expand the possibilities of what can be used with the WHEN, IF, and THEN configuration within the automation rule.
Email Handlers: Sometimes you need more flexibility than what can be found by default in Jira. A perfect example of this is with the email handlers. By default, incoming issues go to a single default project and issue type. But, wouldn't it be nice to say, allow emails from specific clients to go into a separate project, allow keywords in the subject control the issue type that gets created, or to be able to parse text out of the body of the email into custom fields in Jira?
Webbooks: Custom URL endpoints can be created to allow external systems to send messages to scripts. It seems like all today's technology can communicate with each other, like turning your TV off with your phone. Behind the scenes, those types of integrations are done with webhooks.
SIL Runner Gadget: What about the times when you don't have a real hook or event within Jira? What about the times when you just what something to happen when you push a button? Well, the SIL Runner Gadget is here to help you. This handy gadget can create these buttons, and other custom UI elements, on a dashboard for the times when you just need a simple form and a button to make the magic happen. And the best part, these dashboards can be shared with other non-admin users as well.
|