Skip to end of banner
Go to start of banner

Types of Scripts

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 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 actions 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.

  • 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 Keywords: 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 keywords to help but they don't always get the job done. Power Scripts has some prewritten JQL keywords/functions to help. It is also incredibly easy to create your own custom JQL keywords.

  • REST Service: These scripts can be triggered by external systems as part of an integration. And, outgoing REST calls can also be sent by scripts allowing for real-time 2-way integrations with external systems.

  • 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 want 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.

  • SIL Panel: The scripts run inside a custom section within a Jira issue. This lets you add custom content to the issue or even display custom charts and graphs. I use it to show the current weather forecast but you can use it for whatever you want!

Overview of Use Cases

  • No labels