Jira Tool, the best out there | ScriptRunner 101

Jira Tool that will enhance your Agile experience

Don’t we all love Jira? It has so many features and then so many companies actually work with it.  

This time I’ve partnered with ScriptRunner to show you some cool tricks you most likely didn’t know you can do in Jira!

I think it makes sense for us to know how it works so that we can help our teams be better and improve and today I want to show you some cool features that can save you a lot of time and give you some extra information that would be more difficult to find on your own. 

In today’s video, I want to look into a cool app or tool that you can add to Jira to give you some new features and functionalities, and also save you some time finding important information. And this is called ScriptRunner by Adaptavist. 

This video is sponsored by ScriptRunner, which means that I actually had access to their sales and through their dev teams to help me with some of the features so that I can show you some really customized and very specific use cases that will make sense to you and me as Scrum Masters.  

The tool is a bit technical, but well, I made sure that what we’re going to look into today is very easy to use and you can just copy-paste exactly what I’m doing and start using it without the need for any technical skills or even really knowing Jira in detail.  

Let me quickly show you the 3 use cases that could be very helpful for you and for your team that you can use with ScriptRunner.  

Download ScriptRunner for Jira 

So when you are on the ScriptRunner website, you can click on cloud trial. It’s going to take you to the Atlassian marketplace where you can click on Try it Free, and you do have a free version of the ScriptRunner, uh, for under 10 users. If you have less than 10 users, you can try it out and see how it works and then decide whether you want to continue using it. You can actually try it out on your own Jira instance, like create a free Jira account and see how it works. 

When you’re clicking on the try it free, it’ll install it on your Jira.  

Let’s go into Jira and see how it looks. 

So you will either end up on this page that says ‘’Welcome to your ScriptRunner home’’, and then you can go into Script Console and start looking into everything here or you might also end up on this page.  

Here are a few things that I want us to look into more specifically that are very good use cases that can be helpful for you.  

Enhanced Search in Jira

The first thing first is that ScriptRunner comes with Enhanced Search. If you go into the Enhanced Search, you can actually start doing some good things and easy things to gain some information about your Sprints and the tickets you have on your sprints just using their Enhanced Search without having to know JQL

Enhanced Search comes as a part of ScriptRunner, but can also be installed as a separate standalone app in Jira. 

So if you go into filters and just go into the advanced issue search that we usually use to identify specific issues, you need to know how to write the query. I will talk about it maybe in one of the videos, but yeah, it, it has a pretty steep learning curve and ScriptRunner can help you with some very specific use cases. 

More specifically, added after sprint. I think this is a very important one.  

This is a function that you can add into your ScriptRunner Enhanced Search console, and basically for every sprint in your team, you can look into what has been added after you started the sprint, which is a very important metric to track, especially if your team is struggling with changing priorities, constantly changing priorities. 

You can actually use this metric, and show this metric to your stakeholders, your product owner, just to highlight how many issues, and how much new work actually comes into this sprint.  

So how do you do that?  

Click on plus “+” sign and then you have all of the different available functions and more specific ones. You are free to discover what is there, but the one that I’m talking about here is the added after sprint start.  

You just need your board name and your sprint name, and this is the information. To find it, go to your board for your project in Jira and check the address bar. There you can find the board ID. In my case it’s number 4.  

ScriptRunner Enhanced Search Board Number Sprint Name - ScrumMastered 2024

Then the sprint name obviously is right there.  

You can now go back to the Enhanced Search, and use this information in the query.  

When you need to find the same information for a different Sprint, all you need to do is change the Sprint name once you saved this filter in your favorites. And then you can quickly just change the name of the sprint to find this information for other cases, and as you can see there are many different other use cases that you can look into and you can use that would be very easy to get started with and to get gain some of those valuable metrics that you can use to help your team get better. 

Create sub-tasks in Jira automatically

Other use cases can be found in the ScriptRunner itself. I’ll show you a couple of examples that you can make under the Script Console.  

Important note: you don’t need to know any code youself. You can use their library and just copy and paste the code right into the app to help you with some of the tasks.  

The first thing we’ll do is set up a Script Listeners, you can add different things. So these are just examples that come with the ScriptRunner but we’ll add a new one. 

Script Listeners execute an action automatically in response to a specific event in Jira. 

Script Listeners execute an action automatically in response to a specific event in Jira.

I took specifically this one ‘’create subtasks when issues created’’ I found in the ScriptRunner library.

ScriptRunner Script Listeners in Jira Create subtasks automatically - ScrumMastered 2024

Copied it from the library and pasted into the ScriptRunner.

//If issue is a subtask, script is not executed
def fields = issue.fields as Map
def issuetype = fields.issuetype as Map
if (issuetype.subtask) {

// New created issue
def issueKey = issue.key

// Get the issue
def issueResp = get("/rest/api/2/issue/${issueKey}").asObject(Map)
assert issueResp.status == 200
def issue = issueResp.body as Map

// Get the issue types for the instance
def typeResp = get('/rest/api/2/issuetype').asObject(List)
assert typeResp.status == 200
def issueTypes = typeResp.body as List<Map>

def listOfsummaries = ['Subtask summary 1', 'Subtask summary 2'] // The summaries to use for
def subtaskIssueType = 'Sub-task' // The Sub Task Issue Type to Use

// Get the sub task issue type to use
def issueTypeId = issueTypes.find { it.subtask && it.name == subtaskIssueType && !it.scope }?.id
assert issueTypeId: "No subtasks issue type found called '${subtaskIssueType}'"

// Get the project to create the subtask in
def project = fields.project

listOfsummaries.forEach { summary ->
    // Create the subtask
    def resp = post('/rest/api/2/issue')
        .header('Content-Type', 'application/json')
            fields: [
                project  : project,
                issuetype: [
                    id: issueTypeId
                parent   : [
                    id: issue.id
                summary  : summary

    // Get and validate the newly created subtask
    def subtask = resp.body

    // If the sub task created successfully return a success message along with its key
    if (resp.status >= 200 && resp.status < 300 && subtask && subtask.key != null) {
        logger.info("Success - Sub Task Created with the key of ${resp.body.key}")
    } else {
        logger.error("${resp.status}: ${resp.body}")

The only thing that you DO NEED TO CHANGE, is on line 21 where you can define the sub-tasks you want to be created. Otherwise, they will all just be Sub-task 1, 2, 3. 

I have added 5 subtasks: Define the solution, Write unit tests, Get PR reviews, Merge into QA environment, Test in QA environment.  

Now whenever a new issue is created in one of my projects, these five subtasks will be created.  

It is a great use case as having some sub-tasks can be so beneficial for helping you track progress. Especially visually on the Kanban board if you don’t have subtasks you will have difficulty figuring out whether you’re still on track or not.  

With this, it actually removes that tedious part of creating sub-tasks that you need to do manually every time, and instead just sets them up in advance. 

This can be especially useful for things like the Definition of Done. You can actually use it as a DoD for yourself to double-check that everything has been completed and that’s automated. You don’t need to do anything. You just save and whenever a new issue is created, just making sure that it is enabled, you have new subtasks created. 

Jira for Scrum Masters - ScrumMastered 2024

Are you looking for more in-depth guidance on using Jira?

Learn the most essential features you must know as a Scrum team member in my online class Jira for Scrum Masters.

Creating new releases in Jira automatically

Another thing that I wanted to show is the Scheduled Jobs,. 

Same as before, you can add examples integrated in the app. And this example I want to show you comes with ScriptRunner. So you don’t even need to go and copy-paste anything at all when you just import the examples from ScriptRunner. 

ScriptRunner Scheduled Jobs in Jira Create releases automatically - ScrumMastered 2024

This basically creates a new release in Jira every single week on Thursdays.  

So I have chosen Thursdays at 12 pm for the script to run. When it does it will create a new release/version for your project. This can be helpful especially if your team is doing regular releases, continuous deployment. 

You don’t need to create the releases on your own, and then the only thing you need to do is to organize your tickets in your backlog.  

Again, you can copy-paste the code as is. The only thing you’ll need to change is the name of your project where you want the releases to be created. You can find it in line 11 where it says “TEST“. Just change that to the project key of your project in Jira. 

import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
// Getting todays date
final releaseDate = DateTimeFormatter.ISO_LOCAL_DATE.format(LocalDateTime.now())

// This will be the name of the version
final name = "Version no. $releaseDate"

// Replace TEST with the project key you'd like to create a release in
final projectKey = 'TEST'

// Added configuration
final archived = false
final released = false

// Here we tell jira to create the release as specified
    .header('Content-Type', 'application/json')
        name: name,
        archived: archived,
        released: released,
        releaseDate: releaseDate,
        project: projectKey

This is the release that has been created automatically.

ScriptRunner in Jira Releases Versions 2 - ScrumMastered 2024

Your team may claim to not have enough time to spend on organization, or creating sub-tasks or any other tedious tasks. But without doing it they are missing some important improvement opportunities.  

With ScriptRunner you can remove that blocker from their way and make the processes easier so that you and the team can focus on what is really important, while the tools you use are taking care of the boring stuff.  

About the ScriptRunner – Conclusion

Some final thoughts on the tool. I think it may look a bit complicated at first when you are getting started and I definitely needed help from the ScriptRunner’s team to help me figure out how it works but I have shown you everything I know, and I think you need to know.  

If you have developers who can help you figure out some of the scripts and make them even more customized, you can definitely benefit from ScriptRunner even more. 

Work with your team and see what are some of the things, maybe some tedious tasks that are preventing them from really using Jira and enjoying Jira.  

Find some of the examples in the Adaptavist library of how you can facilitate your team’s life really when using Jira and help them automate tedious tasks, get some additional information about the work that they do. And customize the way Jira works for you and for your team.  

I looked into a few very specific cases in this video: 

  • Enhanced Search, which can be a good start for you if you are not very familiar with how to use advanced search in Jira with JQL’s queries and instead how to use ScriptRunner’s Enhanced Search without the need to know any of that query language. 
  • We also looked into how to create sub-tasks for newly created issues, and if you can get help from some of your developers on your team, you can even make it very, very specific to every single different type of task.  
  • Lastly, we looked into how to automatically create releases so that you don’t have to do it manually, and it just kind of comes every single week or every single sprint, single month.  
  • And this is something that can easily help you organize your work and track your progress toward different goals that your team is working on.  

Thank you ScriptRunner for sponsoring this video and giving me access to your developers and to your sales team who help me understand the tool even more so that I can share it with you in an easy to use way that can give you some quick wins right away. 

What do you think? Will you use this tool? What kind of possibilities this can open up for you and your scrum team?  

#Ad #ScriptRunner

More Recent Articles That You May Like

About the author

Hi, my name is Daria Bagina. I’m a Professional Scrum Trainer with Scrum.org and a experience Agile leader. I help teams and organizations to get the most out of the Scrum and Agile implementation by sharing my personal stories and practical advice.

Connect with me