Project Task Email Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2011 12:11 PM
We currently have a number of email notifications going out for Incidents and Changes, such as ticket created, ticket updated, ticket assigned. We'd like to extend this to project tasks, but I'm having trouble getting it working. I've inherited the above and was not part of the original configuration process.
First of all, we do not have the Work Flow plugin enabled. I'd prefer not to enable it for this purpose because I don't want to manage email notificaitons in more than one "place". I'm operating under the assumption that if my current configuration allows me to define email notifications for Incidents, Changes, and Problems, it should be easy to extend to Project Tasks.
It appears that email notifications are triggered on "events". I have business rules in place that define specific events for changes and incidents. I copied these, to some extent, and created "project task events" for Project Tasks:
table name: pm_project_task
run at: server
active: true
whe: after
insert: true
update: true
condition:
script:
if (current.operation() == 'update') {
gs.eventQueue("pm_project_task.updated", current, gs.getUserID(), gs.getUserName());
}
if (!current.assigned_to.nil() && current.assigned_to.changes()) {
gs.eventQueue("pm_project_task.assigned", current, current.assigned_to.getDisplayValue() , previous.assigned_to.getDisplayValue());
}
if (!current.assignment_group.nil() && current.assignment_group.changes()) {
gs.eventQueue("pm_project_task.assigned.to.group", current, current.assignment_group.getDisplayValue() , previous.assignment_group.getDisplayValue());
}
if (current.priority.changes() && current.priority == 1) {
gs.eventQueue("pm_project_task.priority.1", current, current.priority, previous.priority);
}
if (current.active.changesTo(false)) {
gs.eventQueue("pm_project_task.inactive", current, current.pm_project_task_state, previous.pm_project_task_state);
gs.workflowFlush(current);
}
I then went to Email Notifications and created the following:
Name: Project Task Updated
Event Name: project_task_updated
Email Template:
table name: Project Task [pm_project_task]
weight: 0
Type: Email
Send to event creator: true
Active: true
Conditions: Active = true
Subject: Project task '${number}' has been updated/assigned.
Message:
Project task '${number}' has been updated by: ${sys_updated_by}
Short description: ${short_description}
Click here to view: ${URI}
Assigned to: ${assigned_to}
Priority: ${priority}
Planned start date: ${start_date}
Due date: ${due_date}
Parent Number: ${parent.number}
Parent Priority: ${parent.priority}
Parent Assigned to: ${parent.assigned_to}
Description:
${description}
Work notes: ${work_notes}
I've then tested by creating test project tasks (under Project tickets) and updating various fields including "assigned to", work notes, short description, duration, etc. In looking at the outbound email, I do not see any email notifications being generated (none sent, none skipped, none failed)
What am I missing? I have not found any wiki articles that describes the process or requirements for email notifications in sufficient detail to show me what I'm doing wrong. Any/all help is appreciated.
- Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2011 12:47 PM
There's already a business rule (planned task global events) that fires common events for all planned task tables (project, project task, ...depending on plugins installed).
Event registrations also exist for insert, updated, commented, assigned, and inactive for these tables.
All you need to add is the email notification records.
Looks like wiki is light on this feature, I'll make sure we get something added besides the release notes.
http://wiki.service-now.com/index.php?title=Fall_2010_Stable_3_Notable_Changes#Planned_Task_Notification_Events
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2014 01:19 PM
As a follow up to this, I am trying to make replies to the notifications update the record. Basically:
- Project task notification is sent to the Assigned To party
- Once complete the Assigned To person replies to the email with a Completed status
- The system would ingest the email and update the record:
- State = closed
- Work notes = email body
- Date closed = time stamp