- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2014 08:20 AM
Hello everyone,
I am trying to create an email notification that notifies the submitter of an enhancement when fields change on the form, and specifically which field was changed. Our current implementation is set to trigger on form update and sends the notification with a collection of a few pertinent fields on the enhancement form, but it doesn't specify which field was changed ending up with the user either having no idea what was updated (for those that don't keep a super close track of their items) or them having to scour the fields to find what was changed (I am aware of the history functionality, but in many cases these are non-IT people chances are they don't want to learn about the history functionality).
I had initially thought that we could create a single email notification per each field that we want to notify the user if there is changes on (which is a bit arduos to potentially create 10+ notifications), but it was pointed out that this would also send one email per field update so if an analyst completed several updates at once the business client would be blasted with a slew of notifications.
I've taken a look at the wiki and community and I don't think someone has asked this question before, so I'm hoping someone out there has a suggestion!
Thanks so much in advance,
Matt Langton
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2014 09:21 AM
I have always done this in a kind of brute force way. For example:
var automatic_comment = '';
if (current.description.changes()) {
automatic_comment += 'Revised description. ';
changes = true;
}
if (current.short_description.changes()) {
automatic_comment += 'Short description updated. ';
changes = true;
}
if (current.u_comments.changes()) {
automatic_comment += 'Comment added.';
changes = true;
}
if (current.u_tools_product.changes()) {
automatic_comment += 'Assigned Product: ' + current.u_tools_product.u_name + '. ';
changes = true;
}
if (current.u_tools_subproduct.changes()) {
automatic_comment += 'Assigned Subproduct: ' + current.u_tools_subproduct.u_name + '. ';
changes = true;
}
if (current.u_affected_release.changes()) {
automatic_comment += 'Identified affected release: ' + current.u_affected_release.u_name + '. ';
changes = true;
}
if (current.u_type.changes()) {
automatic_comment += 'Assigned issue type. ';
changes = true;
}
if (current.u_issue_priority.changes()) {
automatic_comment += 'Assigned priority. ';
changes = true;
}
if (current.assigned_to.changes()) {
automatic_comment += 'Changed owner to ' + current.assigned_to.name + '. ';
changes = true;
}
if (current.u_status.changes()) {
automatic_comment += 'Changed status to ' + current.u_status + '. ';
changes = true;
}
if (current.u_targeted_release.changes()) {
automatic_comment += 'Changed target release to ' + current.u_targeted_release.u_name + '. ';
changes = true;
}
if (current.u_scheduled_release.changes()) {
automatic_comment += 'Changed release schedule. ';
changes = true;
}
if (current.u_released.changes()) {
automatic_comment += 'Released on ' + current.u_released + '. ';
changes = true;
}
if (current.u_brief_status.changes()) {
automatic_comment += current.u_brief_status + ' ';
changes = true;
}
if (current.closed_at.changes()) {
automatic_comment += 'Changed close date. ';
changes = true;
}
if (current.u_admin_task.changes()) {
automatic_comment += 'Changed administrative task. ';
changes = true;
}
etc.,
then later on, while building the email message:
if (automatic_comment != '') {
email_body += '<tr><td align="center" colspan = >' + automatic_comment + '</td></tr>';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2014 08:25 AM
If any of these answers helped you, please mark the correct answer. Thanks!