Merge pull request #22 from lmann99/email-notification-leaf-tasks-only

Restrict email notifications to leaf node tasks
This commit is contained in:
lmann99 2017-02-05 09:09:32 -05:00 committed by GitHub
commit 89d81f8f5b
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);
}