Restrict email notifications to leaf node tasks

Email notifications for tasks to start or finish should only be sent to individual tasks not
to task groups.
This commit is contained in:
lmann99 2017-02-05 09:05:31 -05:00
parent 1f3ce26c94
commit fd6b2acf4f
2 changed files with 2 additions and 2 deletions

View file

@ -122,7 +122,7 @@ public class SendEmailOnTaskShouldFinish implements IEmailNotificationJob {
for (TaskElement item : tasks) {
DateTime endDate = new DateTime(item.getEndDate());
if ( dateTimeComparator.compare(currentDate, endDate) == 0 ) {
if ( dateTimeComparator.compare(currentDate, endDate) == 0 && item.isLeaf() ) {
// Get all resources for current task and send them email notification
sendEmailNotificationAboutTaskShouldFinish(item);
}

View file

@ -124,7 +124,7 @@ public class SendEmailOnTaskShouldStart implements IEmailNotificationJob {
for (TaskElement item : tasks) {
DateTime startDate = new DateTime(item.getStartDate());
if ( dateTimeComparator.compare(currentDate, startDate) == 0) {
if ( dateTimeComparator.compare(currentDate, startDate) == 0 && item.isLeaf() ) {
// Get all resources for current task and send them email notification
sendEmailNotificationAboutTaskShouldStart(item);
}