Hello All,
We'd like to improve the email by sending it to the custom field change for priority HIGH jira's..
Use Case : Custom filed 'Remediation Owner' is a Type - "Multi User" - when someone changes the value of that field (i.e., select another Owner) I need an e-mail to be sent out to the new Owner/s.
Note- this requirement is not for workflow status change or transition but only to custom filed value change at edit screen
Is there a way we can achieve this by script runner or any other supported way you guys have experienced, please share your thoughts..
Cheers
Mzm
Forgot to mention/ share my findings I got it fixed by adding a small piece of customized code. It works perfectly as per the business requirement and it shoot email whenever ever value custom field change for priority issues.
Below are the steps:
Example
Dear User,
A Security Change Management has assigned/updated a High Priority Jira to you and requires your attention.
For more details, please refer to the link "$baseUrl/browse/${issue.key}"
<% if (mostRecentComment)
out << "Last comment: " << mostRecentComment
%>
Best Regards,
${issue.reporter?.displayName}
Hope this helps if anyone looking for similar requirement.
Cheers
Mzm
An updated version of solution that works on ScriptRunner 7.5.0 with Jira Server 9.0.0 - note minor change where dollar symbol is removed from email template, which then resolves script warning, enables preview of email template (if issue key entered), and allows email send when specified custom field is changes:
changeItems.any {
it.get('field')=='ENTER FIELD NAME HERE'
}
Hello,
"ENTER FIELD NAME HERE" has been updated to ${cfValues['ENTER YOUR FIELD NAME']}
<br>
For more details, please refer to the link "https://baseURL/browse/${issue.key}"
Regards,
${issue.reporter?.displayName}
Issue $issue - "ENTER FIELD NAME HERE" was modified
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mzm,
You can solve this problem with our add-on Raley Notifications
Here's how you approach it:
1) Create new Notification of type "issue updated"
2) Specify relevant project(s) and issue types(s)
3) In Fields updated section choose the custom field Remediation Owner
4) In JQL filter provide: priority = High
5) Provide subject value that make sense for your organization and in "To" section choose Remediation Owner again
6) Your message template will largely depend on your needs. Here's a simple basic that would do the thing:
===========================
Hello!<br/><br/>
Remediation owners have changed for $issue.key<br/>
New value is:</br>
#foreach ($ro in $issue.fields.customfield_12345)
$ro.displayName<br/>
#end
<br/><br/>
All the best,
Raley Notifications
===========================
Let us know if you need help setting this up.
Cheers,
Vladimir | RaleyApps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Vladimir, hope this option should work for us!
I've had a quick glance, I found in Jira Atlassian Marketplace and this seems available for free/ testing whilst, I’m not sure, this trial version would meet our business requirement needs.. let me play around and explore.. will keep you posted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Laura S Here is my solution, which currently works by sending an email when your specific custom field has been modified:
Example
Dear User,
"YOUR FIELD NAME" has been updated to ${cfValues['YOUR FIELD NAME']}
<br>
For more details, please refer to the link "$baseUrl/browse/${issue.key}"
Best Regards,
${issue.reporter?.displayName}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
MzM,
I'm trying to use your solution but it's not working for me. I have a single select list called Resolver Group. Whenever that field is updated, I need an email notification sent to the selected Jira group e.g.
Resolver Group = Development => notification sent to everyone in jira-development-group
Resolver Group = Operations => notification sent to everyone in jira-operations-group
I created a listener > Manage apps > Scriptrunner > Listeners > Create Listeners > "Send a custom email (non-issue events) with the following settings:
- Project: A
- Events: CustomFieldUpdatedEvent
- Condition: "cfValues['Resolver Group'] == 'Development'"
- Email template: A Jira ticket has been assigned to your Resolver Group.
For details, refer to the link "$baseURL/browse/$[issue.key]"
- Subject template: JiraNotice:
- To Users in Groups: jira-development-group
I set the Resolver Group in an Issue to "Development" but nothing happened. Listener history states "Has not run yet". Am I missing a step? Once I get this working, I'll need a little help to expand on the condition to account for 5 resolver groups.
thx,
LS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to do this in a couple clicks in a simple ui, you can use our app in place of ScriptRunner https://marketplace.atlassian.com/apps/1211069/notification-assistant-for-jira-email?hosting=server&tab=overview
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is how we accomplished this for a similar scenario ... we removed the field from the edit screen, and in its place added a "circular" transition from a status back to itself. The transition uses a screen that has that one field on it. So now, rather than editing the issue, a user clicks the "Change ____" button, which pops up the screen with the field, and they change it there. Since it is a transition, we can then send an email to whoever needs it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Payne for the workaround though, much appreciated!
Sorry to inform you, this will not work for us as we need something at edit screen only that to for field change. Moreover, we've 3 diff type of remediation fields, business requirement demands to have shoot email only to remediation owners but not to others like reporter etc… and we cannot afford ending up adding w/flow transitions/ screens for the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.