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:
parent
1f3ce26c94
commit
fd6b2acf4f
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue