I need a Jelly script to send reminder emails to set the due date, when the issue created is 2 weeks old. During the first week of running Jelly script, emials should be sent to just the reporter.
If the reporter has not set the due date during that week, then emails should be sent to Assignee as well, from second week. Could any of you please help with this script?
Filter in Jira: project = JIRA AND created <= -2w AND duedate = EMPTY AND status not in (Closed, Dissapproved, "On Hold")
I have created a jelly script like this:
<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib"
xmlns:core="jelly:core" xmlns:email="jelly:email" xmlns:log="jelly:log">
<jira:Login username="xxxx" password="xxxx" >
<core:invokeStatic className="com.atlassian.jira.ComponentManager" method="getInstance" var="componentManager"/>
<core:invoke on="${componentManager}" method="getProjectManager" var="projectManager"/>
<!-- Run the SearchRequestFilter -->
<jira:RunSearchRequest filterid="10611" var="issues" />
<!-- For each of the filtered issues -->
<core:forEach var="issue" items="${issues}">
<log:warn>Sending reminder to set due date for issue ${issue.key}</log:warn>
<core:invoke on="${projectManager}" method="getProject" var="project">
<core:arg type="java.lang.Long" value="${issue.project}"/>
</core:invoke>
<email:email server="xxxx-exchange.xxxx.com" from="jira@xxxx.com"
to="${issue.reporter}@xxxx.com" subject="[JIRA] Reminder to set Due Date for ${issue.key}">
[https://services.xxxx.com:8443/browse/${issue.key}?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
<b> REMINDER: Please set a Due Date for ${issue.key}</b>
-----------------------------------------------------------------------
Issue Summary: ${issue.summary}
Key: ${issue.key}
URL: https://services.xxxx:8443/browse/${issue.key}
Project: ${project.name}
Reporter: ${issue.reporter}
Assignee: ${issue.assignee}
Thank you,
Jira Administrators
</email:email>
</core:forEach>
</jira:Login>
</JiraJelly>
Community moderators have prevented the ability to post new answers.
I have created two seperate filters (one for first week and the other for second week) and two seperate Jelly scripts.
Hi Vishali,
I am looking to do a very similar thing but am having trouble getting it to work on JIRA 5.
Are you running JIRA 5?
If so, would you mind sharing the scripts you are using? I would be most appreciative.
Thanks, Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I am working on Jira 5. Sure, I would. Can you send me your mail id?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you don't mind Can you share the script with us or post here it self, also i don't want to stick on "to="${issue.reporter}@xxxx.com" for specific domain is there any way to get this reporter email automated to the to address, i have user from many domain. and running on Jira 6.2.7
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Picking up on this, I am using the same code - more or less, like:
<core:invoke on="${projectManager}" method="getProject" var="project" />
<core:arg type="java.lang.Long" value="${issue.project}"/>
<core:invoke>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.