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,17 +483,18 @@ class Alarm(XMLObject, PeriodicityMixin):
'mime_type': 'text/plain'})
notification_tool.sendMessage(recipient=candidate_list,
subject='[%s] ERP5 Alarm Notification: %s' %
(prefix, self.getTitle()),
subject='[%s][%s] Alarm Notification: %s' %
(prefix, self.getPortalObject().getTitle(), self.getTitle()),
message="""
Alarm Title: %s
Alarm Title: %s (%s)
Alarm Description:
%s
Alarm URL: %s
""" % (self.getTitle(), self.getDescription(), self.absolute_url()),
attachment_list=attachment_list)
Alarm Tool Node: %s
""" % (self.getTitle(), self.getId(), self.getDescription(),
self.getPortalObject().portal_alarms.getAlarmNode()),
attachment_list=attachment_list)
security.declareProtected(Permissions.ManagePortal, 'getLastActiveProcess')
def getLastActiveProcess(self, include_active=False):
......
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