Severe Acknowledgements

I'm trying to figure out a way to convert a script we are using in our production environment that still utilizes the XML Jelly scripting in JIRA to the newer Java based Groovy scripts with the current version. Basically what it does is send out notifications to various IT personnel until the issue is acknowledged. I have been looking around ScriptRunner but can't find any way to accomplish this, anyone have any thoughts?


Here is a copy of the code:

<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib" xmlns:core="jelly:core" xmlns:email="jelly:email" xmlns:log="jelly:log">
<core:invokeStatic className="com.atlassian.jira.ComponentManager" method="getInstance" var="componentManager"/>
<core:invoke on="${componentManager}" method="getProjectManager" var="projectManager"/>


<jira:Login username="scriptingaccount" password="**********">
<log:info>Running Close issues service</log:info>
<!-- Properties for the script -->

<core:set var="filter7Days" value="12748" />

<!-- Run the SearchRequestFilter -->
<jira:RunSearchRequest filterid="${filter7Days}" var="filterResults" />

<!-- Iterate over the issues -->

<core:forEach var="issue" items="${filterResults}">

<!--Calls User Manager to Get Username & Email address-->
<core:invokeStatic className="com.opensymphony.user.UserManager" method="getInstance" var="instance"></core:invokeStatic>

<core:invoke on="${instance}" method="getUser" var="user">
<core:arg type="java.lang.String" value="${issue.assignee}"/>

<!--Email content and logged message-->

<log:warn>Sending reminder email for ${issue.key}</log:warn>
<email:email to="" from="" subject="Critical Issue: ${issue.key} ${issue.summary} needs immediate attention"
server ="mail2">

Issue ${issue.summary} requires immediate attention.

Please acknowledge the error and between work.

Requester: ${issue.reporter}



Thanks for the help.




1 answer

So, there are some built-in tools for ScriptRunner to send emails at various points.

There's a post-function and an event listener, which make it easy to fire an email when certain things happen.

It looks like your jelly script runs on a scheduled service. You could couple one of those options (an event listener or post function) with a service (perhaps the escalation service in particular) to send an email on a timed interval, rather than just waiting for a particular event or workflow to be executed.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

77 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you