[Erp5-report] r23959 - in /erp5/trunk/bt5/erp5_forge: SkinTemplateItem/portal_skins/erp5_fo...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 2 01:00:35 CEST 2008
Author: rafael
Date: Thu Oct 2 01:00:32 2008
New Revision: 23959
URL: http://svn.erp5.org?rev=23959&view=rev
Log:
Fixed Open Bug Alarm notification.
- Use portal_notifications.
- Added set_ready state for get assigned Bugs
Modified:
erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/BugModule_sendOpenBugListReminder.xml
erp5/trunk/bt5/erp5_forge/bt/revision
Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/BugModule_sendOpenBugListReminder.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/BugModule_sendOpenBugListReminder.xml?rev=23959&r1=23958&r2=23959&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/BugModule_sendOpenBugListReminder.xml (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/BugModule_sendOpenBugListReminder.xml Thu Oct 2 01:00:32 2008
@@ -53,13 +53,8 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string encoding="cdata"><![CDATA[
-
-portal = context.getPortalObject()\n
+ <value> <string>portal = context.getPortalObject()\n
bug_module = portal.bug_module\n
-from_name = portal.getProperty(\'email_from_name\', \'ERP5\')\n
-from_address = portal.getProperty(\'email_from_address\', \'postmaster at localhost\')\n
-to_address = portal.getProperty(\'email_to_address\', from_address)\n
server_url = portal.ERP5Site_getAbsoluteUrl()\n
\n
body_text_line_list = []\n
@@ -70,7 +65,7 @@
not_assigned_bug_list=[]\n
\n
for bug in bug_module.searchFolder(portal_type=\'Bug\',\n
- simulation_state=\'confirmed\',\n
+ simulation_state=[\'confirmed\', \'set_ready\' ],\n
sort_on=((\'id\', \'asc\', \'int\'),)):\n
bug = bug.getObject()\n
if bug.getDestination():\n
@@ -95,28 +90,11 @@
addBodyLine(" %s/%s/view" % (server_url, bug.getRelativeUrl()))\n
addBodyLine(\'\')\n
\n
-mail_text = """From: "%s" <%s>\n
-To: %s\n
-Subject: %s: %s Open Bugs\n
-MIME-Version: 1.0\n
-Content-Type: text/plain;\n
- charset="utf-8"\n
-Content-Transfer-Encoding: 8bit\n
-Content-Disposition: inline\n
-\n
-%s""" % (\n
- from_name,\n
- from_address,\n
- to_address,\n
- portal.title_or_id(),\n
- bug_count,\n
- \'\\n\'.join(body_text_line_list)\n
-)\n
-if bug_count:\n
- portal.MailHost.send(mail_text)\n
-
-
-]]></string> </value>
+portal.portal_notifications.sendMessage(sender=None,\n
+ recipient=[],\n
+ subject="%s: %s Open Bugs" % (portal.title_or_id(), bug_count,),\n
+ message=\'\\n\'.join(body_text_line_list))\n
+</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
@@ -156,9 +134,6 @@
<string>context</string>
<string>portal</string>
<string>bug_module</string>
- <string>from_name</string>
- <string>from_address</string>
- <string>to_address</string>
<string>server_url</string>
<string>body_text_line_list</string>
<string>addBodyLine</string>
@@ -171,7 +146,7 @@
<string>assignee</string>
<string>bug_list</string>
<string>_getitem_</string>
- <string>mail_text</string>
+ <string>None</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_forge/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/revision?rev=23959&r1=23958&r2=23959&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/revision (original)
+++ erp5/trunk/bt5/erp5_forge/bt/revision Thu Oct 2 01:00:32 2008
@@ -1,1 +1,1 @@
-385
+388
More information about the Erp5-report
mailing list