Commit afab3809 authored by Nicolas Delaby's avatar Nicolas Delaby

2008-09-02 nicolas

* add new transition to display Re Assign in workflow action
* Bug Notification can be send later to change recipient list
* Add File dialog require missing mandatory fields
* New worklist on bug_evnt_worklow to display planned Bug Line

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23350 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent caf23bb5
...@@ -73,49 +73,49 @@ translateString = context.Base_translateString\n ...@@ -73,49 +73,49 @@ translateString = context.Base_translateString\n
\n \n
default_bug_line = getattr(context, "default_bug_line", None)\n default_bug_line = getattr(context, "default_bug_line", None)\n
if default_bug_line is None and context.getPortalType() == \'Bug\':\n if default_bug_line is None and context.getPortalType() == \'Bug\':\n
default_bug_line = context.newContent(id="default_bug_line", \n default_bug_line = context.newContent(id="default_bug_line",\n
portal_type="Bug Line",\n portal_type="Bug Line",\n
title="Default Bug Line")\n title="Default Bug Line")\n
else:\n elif default_bug_line is None:\n
default_bug_line = context\n default_bug_line = context\n
\n \n
# Create a new File or Image Document\n # Create a new File or Image Document\n
document = default_bug_line.newContent(portal_type=portal_type, \n document = default_bug_line.newContent(portal_type=portal_type,\n
description=description, \n description=description,\n
title=title,\n title=title,\n
file=file)\n file=file,\n
reference=kw.get(\'reference\'),\n
version=kw.get(\'version\'),\n
language=kw.get(\'language\'))\n
\n
if context.getPortalType() == \'Bug\':\n if context.getPortalType() == \'Bug\':\n
bug = context\n bug = context\n
else:\n else:\n
bug = context.getParentValue()\n bug = context.getParentValue()\n
body = """\n body = """\n
New %s was added. \n New %s was added.\n
Title: %s\n Title: %s\n
Description: %s\n Description: %s\n
Link: %s/view\n Link: %s/view\n
\n \n
Bug Title: %s\n Bug Title: %s\n
Bug Link: %s/view\n Bug Link: %s/view\n
""" % (document.getPortalType(),\n """ % (document.getPortalType(),\n
document.getTitle(), document.getDescription(), \n document.getTitle(), document.getDescription(),\n
document.getAbsoluteUrl(), bug.getTitle(), \n document.getAbsoluteUrl(), bug.getTitle(),\n
bug.getAbsoluteUrl())\n bug.getAbsoluteUrl())\n
\n \n
# Define Recipents\n recipient_list= bug.Bug_getRecipientValueList()\n
project = bug.getDestinationProjectValue()\n
if project is not None:\n
recipient_list = [ i.getParent() for i in project.getDestinationProjectRelatedValueList(portal_type="Assignment")]\n
\n
sender = bug.Bug_getNotificationSenderValue()\n sender = bug.Bug_getNotificationSenderValue()\n
\n \n
portal = bug.getPortalObject()\n portal = bug.getPortalObject()\n
portal.portal_notifications.sendMessage(sender=sender,\n portal.portal_notifications.sendMessage(sender=sender,\n
recipient=recipient_list, \n recipient=recipient_list,\n
subject="[ERP5 Bug] [New File] %s" % (bug.getTitle()), \n subject="[ERP5 Bug] [New File] %s" % (bug.getTitle()),\n
message=body)\n message=body)\n
\n \n
# Redirect to even\n # Redirect to even\n
portal_status_message = translateString("New ${portal_type} Added.", \n portal_status_message = translateString("New ${portal_type} Added.",\n
mapping = dict(portal_type = translateString(portal_type)))\n mapping = dict(portal_type = translateString(portal_type)))\n
return document.Base_redirect(\'view\', keep_items = dict(portal_status_message=portal_status_message), **kw)\n return document.Base_redirect(\'view\', keep_items = dict(portal_status_message=portal_status_message), **kw)\n
</string> </value> </string> </value>
...@@ -132,6 +132,12 @@ return document.Base_redirect(\'view\', keep_items = dict(portal_status_message= ...@@ -132,6 +132,12 @@ return document.Base_redirect(\'view\', keep_items = dict(portal_status_message=
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>portal_type, title, description, file, form_id=\'view\', **kw</string> </value> <value> <string>portal_type, title, description, file, form_id=\'view\', **kw</string> </value>
...@@ -175,11 +181,6 @@ return document.Base_redirect(\'view\', keep_items = dict(portal_status_message= ...@@ -175,11 +181,6 @@ return document.Base_redirect(\'view\', keep_items = dict(portal_status_message=
<string>document</string> <string>document</string>
<string>bug</string> <string>bug</string>
<string>body</string> <string>body</string>
<string>project</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>i</string>
<string>recipient_list</string> <string>recipient_list</string>
<string>sender</string> <string>sender</string>
<string>portal</string> <string>portal</string>
......
...@@ -42,6 +42,12 @@ ...@@ -42,6 +42,12 @@
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>action</string> </key> <key> <string>action</string> </key>
<value> <string>Bug_newFile</string> </value> <value> <string>Bug_newFile</string> </value>
...@@ -104,7 +110,10 @@ ...@@ -104,7 +110,10 @@
<list> <list>
<string>your_portal_type</string> <string>your_portal_type</string>
<string>your_title</string> <string>your_title</string>
<string>your_reference</string>
<string>your_language</string>
<string>your_file</string> <string>your_file</string>
<string>your_version</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -129,7 +138,7 @@ ...@@ -129,7 +138,7 @@
</item> </item>
<item> <item>
<key> <string>name</string> </key> <key> <string>name</string> </key>
<value> <string>Ticket_viewNewFileDialog</string> </value> <value> <string>Bug_viewNewFileDialog</string> </value>
</item> </item>
<item> <item>
<key> <string>pt</string> </key> <key> <string>pt</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="StringField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_language</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Language</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="StringField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_reference</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Reference</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="StringField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_version</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Version</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -105,7 +105,7 @@ body += """ Messages :\n ...@@ -105,7 +105,7 @@ body += """ Messages :\n
simulation_state = (\'delivered\', \'started\')\n simulation_state = (\'delivered\', \'started\')\n
bug_message_list = [bug_message]\n bug_message_list = [bug_message]\n
lines_list = bug.searchFolder(portal_type=\'Bug Line\', sort_on=(("id", "DESC"),),\n lines_list = bug.searchFolder(portal_type=\'Bug Line\', sort_on=(("id", "DESC"),),\n
simulation_state=simulation_state) \n simulation_state=simulation_state)\n
bug_message_list.extend(lines_list)\n bug_message_list.extend(lines_list)\n
message_count = len(bug_message_list)+1\n message_count = len(bug_message_list)+1\n
for message in bug_message_list:\n for message in bug_message_list:\n
...@@ -116,10 +116,12 @@ for message in bug_message_list:\n ...@@ -116,10 +116,12 @@ for message in bug_message_list:\n
""" % (message_count, bug_message.getSourceTitle(\'\'), \n """ % (message_count, bug_message.getSourceTitle(\'\'), \n
message.getStartDate(), message.getTextContent(\'\') )\n message.getStartDate(), message.getTextContent(\'\') )\n
\n \n
recipient_list = bug_message.BugLine_getRecipientValueList()\n
\n
portal = bug_message.getPortalObject()\n portal = bug_message.getPortalObject()\n
portal.portal_notifications.sendMessage(sender=bug_message.getSourceValue(),\n portal.portal_notifications.sendMessage(sender=bug_message.getSourceValue(),\n
recipient=bug_message.getDestinationValueList(), \n recipient=recipient_list,\n
subject="[Bug %s] %s" % (bug.getReference(), bug.getTitle()), \n subject="[Bug %s] %s" % (bug.getReference(), bug.getTitle()),\n
message=body)\n message=body)\n
</string> </value> </string> </value>
</item> </item>
...@@ -178,6 +180,7 @@ portal.portal_notifications.sendMessage(sender=bug_message.getSourceValue(),\n ...@@ -178,6 +180,7 @@ portal.portal_notifications.sendMessage(sender=bug_message.getSourceValue(),\n
<string>message_count</string> <string>message_count</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>message</string> <string>message</string>
<string>recipient_list</string>
<string>portal</string> <string>portal</string>
</tuple> </tuple>
</value> </value>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Posted</string> </value> <value> <string>Send</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
......
...@@ -21,6 +21,12 @@ ...@@ -21,6 +21,12 @@
<dictionary/> <dictionary/>
</value> </value>
</item> </item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>worklists</string> </value> <value> <string>worklists</string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="WorklistDefinition" module="Products.DCWorkflow.Worklists"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>global</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Bug Lines to Send (%(count)s)</string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string encoding="cdata"><![CDATA[
/WebSite_viewAdvancedSearchResultList?portal_type=%(portal_type)s&simulation_state=planned&local_roles=%(local_roles)s&reset:int=1
]]></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Bug Lines to Send.</string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>01_planned_bug_line_list</string> </value>
</item>
<item>
<key> <string>var_matches</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Owner</string>
<string>Assignee</string>
<string>Assignor</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>portal_type</string> </key>
<value>
<tuple>
<string>Bug Line</string>
</tuple>
</value>
</item>
<item>
<key> <string>simulation_state</string> </key>
<value>
<tuple>
<string>planned</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -68,8 +68,15 @@ ...@@ -68,8 +68,15 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
bug = state_change["object"]\n bug = state_change["object"]\n
valid_transaction_list = ["confirm_action", "stop_action", \n history = bug.portal_workflow.getInfoFor(bug, \'history\',\n
"deliver_action", "set_ready_action" , "cancel_action"]\n wf_id=\'bug_workflow\')\n
for history_item in history[::-1]:\n
if history_item[\'action\'].endswith(\'action\'):\n
send_event = history_item[\'send_event\']\n
break\n
\n
valid_transaction_list = ["confirm_action", "stop_action",\n
"deliver_action", "set_ready_action", "cancel_action"]\n
\n \n
message = [ h for h in state_change.getHistory() \\\n message = [ h for h in state_change.getHistory() \\\n
if h[\'action\'] in valid_transaction_list]\n if h[\'action\'] in valid_transaction_list]\n
...@@ -78,13 +85,14 @@ comment = ""\n ...@@ -78,13 +85,14 @@ comment = ""\n
if len(message) > 0:\n if len(message) > 0:\n
comment=message[-1]["comment"]\n comment=message[-1]["comment"]\n
\n \n
line = bug.newContent(title="Bug %s was %s" % (bug.getReference(),\n line = bug.newContent(title="Bug %s was %s" % (bug.getReference(), bug.getSimulationStateTitle()),\n
bug.getSimulationStateTitle()),\n portal_type="Bug Line",\n
portal_type="Bug Line",\n text_content=comment)\n
text_content=comment)\n if send_event:\n
\n # This will post The message Automatically.\n
# This will post The message Automatically.\n line.start()\n
line.start()\n else:\n
line.plan()\n
]]></string> </value> ]]></string> </value>
...@@ -138,11 +146,14 @@ line.start()\n ...@@ -138,11 +146,14 @@ line.start()\n
<string>state_change</string> <string>state_change</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>bug</string> <string>bug</string>
<string>_getattr_</string>
<string>history</string>
<string>_getiter_</string>
<string>history_item</string>
<string>send_event</string>
<string>valid_transaction_list</string> <string>valid_transaction_list</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>h</string> <string>h</string>
<string>message</string> <string>message</string>
<string>comment</string> <string>comment</string>
......
2008-09-02 nicolas
* add new transition to display Re Assign in workflow action
* Bug Notification can be send later to change recipient list
* Add File dialog require missing mandatory fields
* New worklist on bug_evnt_worklow to display planned Bug Line
2008-08-29 yusei 2008-08-29 yusei
* Improve domain tree mode of glossary term list. * Improve domain tree mode of glossary term list.
......
335 336
\ No newline at end of file \ No newline at end of file
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