Fix PHP notice when sending overdue notifications
This commit is contained in:
@@ -13,6 +13,10 @@ Improvements:
|
|||||||
* Show project name in task forms
|
* Show project name in task forms
|
||||||
* Convert vanilla CSS to SASS
|
* Convert vanilla CSS to SASS
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* Fix PHP notice when sending overdue notifications
|
||||||
|
|
||||||
Version 1.0.32
|
Version 1.0.32
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class MailNotification extends Base implements NotificationInterface
|
|||||||
{
|
{
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'[%s] %s',
|
'[%s] %s',
|
||||||
$eventData['task']['project_name'],
|
isset($eventData['project_name']) ? $eventData['project_name'] : $eventData['task']['project_name'],
|
||||||
$this->notificationModel->getTitleWithoutAuthor($eventName, $eventData)
|
$this->notificationModel->getTitleWithoutAuthor($eventName, $eventData)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,11 @@ class MailNotificationTest extends Base
|
|||||||
$this->assertNotEmpty($mailNotification->getMailContent($eventName, $eventData));
|
$this->assertNotEmpty($mailNotification->getMailContent($eventName, $eventData));
|
||||||
$this->assertStringStartsWith('[test] ', $mailNotification->getMailSubject($eventName, $eventData));
|
$this->assertStringStartsWith('[test] ', $mailNotification->getMailSubject($eventName, $eventData));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->assertStringStartsWith('[Test1, Test2] ', $mailNotification->getMailSubject(TaskModel::EVENT_OVERDUE, array(
|
||||||
|
'tasks' => array(array('id' => 123), array('id' => 456)),
|
||||||
|
'project_name' => 'Test1, Test2',
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSendWithEmailAddress()
|
public function testSendWithEmailAddress()
|
||||||
|
|||||||
Reference in New Issue
Block a user