Commit c92f31e1 authored by Julien Muchembled's avatar Julien Muchembled

Show more information in alarm notifications to know easily where the alarm ran

* Add portal title in the subject.
* Display alarm node and alarm id in the body.
* Remove the URL, which always starts with "http://:/"

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28400 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a19e3010
...@@ -483,16 +483,17 @@ class Alarm(XMLObject, PeriodicityMixin): ...@@ -483,16 +483,17 @@ class Alarm(XMLObject, PeriodicityMixin):
'mime_type': 'text/plain'}) 'mime_type': 'text/plain'})
notification_tool.sendMessage(recipient=candidate_list, notification_tool.sendMessage(recipient=candidate_list,
subject='[%s] ERP5 Alarm Notification: %s' % subject='[%s][%s] Alarm Notification: %s' %
(prefix, self.getTitle()), (prefix, self.getPortalObject().getTitle(), self.getTitle()),
message=""" message="""
Alarm Title: %s Alarm Title: %s (%s)
Alarm Description: Alarm Description:
%s %s
Alarm URL: %s Alarm Tool Node: %s
""" % (self.getTitle(), self.getDescription(), self.absolute_url()), """ % (self.getTitle(), self.getId(), self.getDescription(),
self.getPortalObject().portal_alarms.getAlarmNode()),
attachment_list=attachment_list) attachment_list=attachment_list)
security.declareProtected(Permissions.ManagePortal, 'getLastActiveProcess') security.declareProtected(Permissions.ManagePortal, 'getLastActiveProcess')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment