[Erp5-report] r21597 - in /erp5/trunk/bt5/erp5_project: WorkflowTemplateItem/portal_workflo...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jun 16 09:26:16 CEST 2008
Author: jerome
Date: Mon Jun 16 09:26:15 2008
New Revision: 21597
URL: http://svn.erp5.org?rev=21597&view=rev
Log:
Only send notifications if the recipient have an email address and is a user in the system.
Add some missing /view in URLs included in messages.
Modified:
erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReportWorkflow_notifyFinishedTaskReport.xml
erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReport_notifyAssignee.xml
erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReport_notifyRestartToAssignee.xml
erp5/trunk/bt5/erp5_project/bt/revision
Modified: erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReportWorkflow_notifyFinishedTaskReport.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReportWorkflow_notifyFinishedTaskReport.xml?rev=21597&r1=21596&r2=21597&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReportWorkflow_notifyFinishedTaskReport.xml (original)
+++ erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReportWorkflow_notifyFinishedTaskReport.xml Mon Jun 16 09:26:15 2008
@@ -72,7 +72,13 @@
destination_decision_person = task_report.getDestinationDecisionValue(portal_type="Person")\n
if destination_decision_person is None:\n
destination_decision_person = task_report.getDestinationValue(portal_type="Person")\n
-if source_person is not None and destination_decision_person is not None:\n
+\n
+# We send a message only if the requester have an email and is a user in the\n
+# system.\n
+if source_person is not None \\\n
+ and destination_decision_person is not None \\\n
+ and destination_decision_person.getDefaultEmailText() \\\n
+ and destination_decision_person.getReference():\n
message = """\n
%s has finished the task report titled with %s.\n
Please look at this URL:\n
Modified: erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReport_notifyAssignee.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReport_notifyAssignee.xml?rev=21597&r1=21596&r2=21597&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReport_notifyAssignee.xml (original)
+++ erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReport_notifyAssignee.xml Mon Jun 16 09:26:15 2008
@@ -86,7 +86,13 @@
destination_decision_person = task_report.getDestinationDecisionValue(portal_type="Person")\n
if destination_decision_person is None:\n
destination_decision_person = task_report.getDestinationValue(portal_type="Person")\n
-if source_person is not None and destination_decision_person is not None:\n
+\n
+# send notification only if the source have a valid email and is a user in the\n
+# system\n
+if source_person is not None \\\n
+ and destination_decision_person is not None\\\n
+ and source_person.getDefaultEmailText() \\\n
+ and source_person.getReference():\n
message = """\n
A question from task has been assigned to you by %(assignor)s.\n
\n
@@ -105,7 +111,7 @@
""" % {\n
\'assignor\': destination_decision_person.getTitle(),\n
\'title\' : task_report.getTitle(),\n
- \'url\' : \'%s/%s\' % (task_report.ERP5Site_getAbsoluteUrl(),\n
+ \'url\' : \'%s/%s/view\' % (task_report.ERP5Site_getAbsoluteUrl(),\n
task_report.getRelativeUrl()),\n
\'comment\' : task_report.getComment(),\n
\'start_date\': task_report.getStartDate().Date(),\n
Modified: erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReport_notifyRestartToAssignee.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReport_notifyRestartToAssignee.xml?rev=21597&r1=21596&r2=21597&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReport_notifyRestartToAssignee.xml (original)
+++ erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_workflow/scripts/TaskReport_notifyRestartToAssignee.xml Mon Jun 16 09:26:15 2008
@@ -72,7 +72,13 @@
destination_decision_person = task_report.getDestinationDecisionValue(portal_type="Person")\n
if destination_decision_person is None:\n
destination_decision_person = task_report.getDestinationValue(portal_type="Person")\n
-if source_person is not None and destination_decision_person is not None:\n
+\n
+# send notification only if the source have a valid email and is a user in the\n
+# system\n
+if source_person is not None \\\n
+ and destination_decision_person is not None\\\n
+ and source_person.getDefaultEmailText() \\\n
+ and source_person.getReference():\n
message = """\n
Restarted task has been assigned to you by %(assignor)s.\n
\n
@@ -88,7 +94,7 @@
""" % {\n
\'assignor\': destination_decision_person.getTitle(),\n
\'title\' : task_report.getTitle(),\n
- \'url\' : \'%s/%s\' % (task_report.ERP5Site_getAbsoluteUrl(),\n
+ \'url\' : \'%s/%s/view\' % (task_report.ERP5Site_getAbsoluteUrl(),\n
task_report.getRelativeUrl()),\n
\'comment\' : task_report.getComment(),\n
\'start_date\': task_report.getStartDate().Date(),\n
Modified: erp5/trunk/bt5/erp5_project/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_project/bt/revision?rev=21597&r1=21596&r2=21597&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_project/bt/revision (original)
+++ erp5/trunk/bt5/erp5_project/bt/revision Mon Jun 16 09:26:15 2008
@@ -1,1 +1,1 @@
-528
+529
More information about the Erp5-report
mailing list