Unleash the real power of JIRA with SIL, the Simple Issue Language

  • Font size: Larger Smaller
  • Subscribe to this entry
  • Print
Unleash the real power of JIRA with SIL, the Simple Issue Language

I'm starting a series of article on the Simple Issue Language, a.k.a. SIL, which is a scripting language for JIRA that is developed by my good friends at Kepler Rominfo. SIL is available in several plugins, and it will completely change the way you use JIRA. Keep reading and I will show you how.

How I stopped worrying and learned to love SIL

I've been working as a professional JIRA consultant for more than six years, and to this day I keep being impressed by JIRA's versatility. I've implemented complex engineering workflows, new employee onboarding processes, private placement requests, and yes, bug workflows as well!

Along the way, I've used various means in order to stretch the "JIRA elastic" to its limits in terms of the functionalities it can offer. I started by installing free plugins like JIRA Suite Utilities and (not free anymore!) JIRA Misc Workflow Extensions to get new conditions, validators, and postfunctions. Then I started using Jelly Scripting for escalations, and then it was various scripting languages to supercharge the JIRA workflow engine. I'm talking about Groovy when using Script Runner, Jython when using JIRA Scripting Suite, the old SOAP API (to be discontinued when JIRA 7 releases), the new REST API, and even the JIRA Command Line Interface. I've had colleagues write custom plugins when none of that worked.

I stumbled upon SIL while working on a mandate last year in Edmonton, Canada. There were a few of us building different workflows, and one group was starting to use this new scripting language in their workflows. At first I thought "Not another scripting language, I already use Groovy and Jython, why the ... would I need something else?", but I clearly remember one of the guys talking about SIL and saying "Felix, you're going to take this thing and run with it once you get your hands on it."

Boy, was he ever right about that.

Let me put it this way. The Kepler plugins and Simple Issue Language are to JIRA what fire is to mankind. I'm not even joking. As a JIRA consultant specialized in configuring complex workflows for business users, the Simple Issue Language has brought my game to a whole new level. The range of possibilities it opens up and the speed at which we can deliver said possibilities allows us to focus on what's really important: the client's needs and making sure you deliver what they want.

Why SIL rocks

Consider the following example: You wish to write a postfunction that launches a "Reopen" transition on an subtask's parent issue.

Here is how you would code it in Jython with the JIRA Scripting Suite plugin:

#Launch the transition JYTHON-REOPEN for parent issue
from com.atlassian.jira.util import JiraUtils
from com.atlassian.jira.workflow import WorkflowTransitionUtilImpl
from com.atlassian.jira.util import ImportUtils
from com.atlassian.jira import ComponentManager

parent = issue.getParentObject()

if parent.getStatusObject().getName() == "Closed":
  workflowTransitionUtil = JiraUtils.loadComponent(WorkflowTransitionUtilImpl)
  workflowTransitionUtil.setAction(301) # The id of the "JYTHON-REOPEN" transition
  workflowTransitionUtil.setIssue(parent)
  workflowTransitionUtil.setUsername('jiraadmin')
  result = workflowTransitionUtil.progress()
  if result.hasAnyErrors():
    errorString = "Error retrograding Issue '" + parent.getKey() + "'. " + ", ".join(result.getErrorMessages())
    raise Exception(errorString)
  # Update search indexes for the parent issue
  ImportUtils.setIndexIssues(True)
  ComponentManager.getInstance().getIndexManager().reIndex(parent)
  ImportUtils.setIndexIssues(False)

Here is the equivalent postfunction in SIL:

// Launch the transition SIL-REOPEN for parent issue
if(%parent%.status == "Coordinator Information Check"){
    autotransition(parent, "SIL-REOPEN");
}
runAs("jiraadmin");

The point is

I'm not using Jython or Groovy anymore! Seriously, the point is SIL is a domain specific language, specific to JIRA. The guys at Kepler Rominfo made sure it was simple to use, for a scripting language that is. I mean you still need to understand core programming concepts such as functions, loops, and variable assignment. You get so many things "for free" and that allows you to focus on your business logic. Once you get a hang of it, you'll be almost unstoppable.

In all honesty, SIL has its limitations but they pale in comparison to what it allows you to do.

What's next

Over the next weeks / months, my plan is to go through all that the Kepler plugins and SIL have to offer and provide real world examples. To be 100% honest, I'm super busy, so I'll do my best to keep on posting articles regularly. If you've enjoyed some of those articles already and wound up here, or are looking forward to next ones, make sure to leave a comment. It will be a big source of motivation for me.

In the meantime

If I've already convinced you to look into SIL, I recommend you bookmark the Variable Resolution page of the official documentation, that's one SIL link I use all the time.

Special Thanks

I want to thank Garth Leavey for introducing me to SIL, as well Radu Dumitriu and Florin Haszler at Kepler Info for answering my questions along the way.

in JIRA Hits: 8605 2 Comments

Comments

  • Guest
    Garth Leavey Monday, 12 January 2015

    I just stumbled upon this article Felix!!! Nice work!

    I'm glad to see you guys are still using SIL.

  • TechSolCom
    TechSolCom Tuesday, 13 January 2015

    Hey Garth, it's all thanks to you!!! SIL has been a complete game changer :)

Leave your comment

Guest
Guest Saturday, 19 August 2017