From afab3809b52fa3aefc7bb17d1a92a05429529f86 Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Tue, 2 Sep 2008 14:38:59 +0000 Subject: [PATCH] 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 --- .../portal_skins/erp5_forge/Bug_newFile.xml | 51 ++-- .../erp5_forge/Bug_viewNewFileDialog.xml | 11 +- .../Bug_viewNewFileDialog/your_language.xml | 263 ++++++++++++++++++ .../Bug_viewNewFileDialog/your_reference.xml | 263 ++++++++++++++++++ .../Bug_viewNewFileDialog/your_version.xml | 263 ++++++++++++++++++ .../scripts/BugEvent_sendNotification.xml | 9 +- .../bug_event_workflow/states/started.xml | 2 +- .../bug_event_workflow/worklists.xml | 6 + .../worklists/01_planned_bug_line_list.xml | 114 ++++++++ .../scripts/Bug_sendNotification.xml | 33 ++- bt5/erp5_forge/bt/change_log | 6 + bt5/erp5_forge/bt/revision | 2 +- 12 files changed, 981 insertions(+), 42 deletions(-) create mode 100644 bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog/your_language.xml create mode 100644 bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog/your_reference.xml create mode 100644 bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog/your_version.xml create mode 100644 bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/worklists/01_planned_bug_line_list.xml diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_newFile.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_newFile.xml index e59d3ae001..ed81874daf 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_newFile.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_newFile.xml @@ -73,49 +73,49 @@ translateString = context.Base_translateString\n \n default_bug_line = getattr(context, "default_bug_line", None)\n if default_bug_line is None and context.getPortalType() == \'Bug\':\n - default_bug_line = context.newContent(id="default_bug_line", \n - portal_type="Bug Line",\n - title="Default Bug Line")\n -else:\n + default_bug_line = context.newContent(id="default_bug_line",\n + portal_type="Bug Line",\n + title="Default Bug Line")\n +elif default_bug_line is None:\n default_bug_line = context\n \n # Create a new File or Image Document\n -document = default_bug_line.newContent(portal_type=portal_type, \n - description=description, \n - title=title,\n - file=file)\n +document = default_bug_line.newContent(portal_type=portal_type,\n + description=description,\n + title=title,\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 bug = context\n else:\n bug = context.getParentValue()\n body = """\n -New %s was added. \n +New %s was added.\n Title: %s\n Description: %s\n Link: %s/view\n - \n +\n Bug Title: %s\n Bug Link: %s/view\n """ % (document.getPortalType(),\n - document.getTitle(), document.getDescription(), \n - document.getAbsoluteUrl(), bug.getTitle(), \n + document.getTitle(), document.getDescription(),\n + document.getAbsoluteUrl(), bug.getTitle(),\n bug.getAbsoluteUrl())\n \n -# Define Recipents\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 +recipient_list= bug.Bug_getRecipientValueList()\n sender = bug.Bug_getNotificationSenderValue()\n \n portal = bug.getPortalObject()\n portal.portal_notifications.sendMessage(sender=sender,\n - recipient=recipient_list, \n - subject="[ERP5 Bug] [New File] %s" % (bug.getTitle()), \n + recipient=recipient_list,\n + subject="[ERP5 Bug] [New File] %s" % (bug.getTitle()),\n message=body)\n \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 return document.Base_redirect(\'view\', keep_items = dict(portal_status_message=portal_status_message), **kw)\n </string> </value> @@ -132,6 +132,12 @@ return document.Base_redirect(\'view\', keep_items = dict(portal_status_message= <none/> </value> </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> <item> <key> <string>_params</string> </key> <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= <string>document</string> <string>bug</string> <string>body</string> - <string>project</string> - <string>append</string> - <string>$append0</string> - <string>_getiter_</string> - <string>i</string> <string>recipient_list</string> <string>sender</string> <string>portal</string> diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog.xml index de43da63e2..18cf3cfca7 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog.xml @@ -42,6 +42,12 @@ <tuple/> </value> </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> <item> <key> <string>action</string> </key> <value> <string>Bug_newFile</string> </value> @@ -104,7 +110,10 @@ <list> <string>your_portal_type</string> <string>your_title</string> + <string>your_reference</string> + <string>your_language</string> <string>your_file</string> + <string>your_version</string> </list> </value> </item> @@ -129,7 +138,7 @@ </item> <item> <key> <string>name</string> </key> - <value> <string>Ticket_viewNewFileDialog</string> </value> + <value> <string>Bug_viewNewFileDialog</string> </value> </item> <item> <key> <string>pt</string> </key> diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog/your_language.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog/your_language.xml new file mode 100644 index 0000000000..6a60300e8d --- /dev/null +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog/your_language.xml @@ -0,0 +1,263 @@ +<?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> diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog/your_reference.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog/your_reference.xml new file mode 100644 index 0000000000..fc5b2368f5 --- /dev/null +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog/your_reference.xml @@ -0,0 +1,263 @@ +<?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> diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog/your_version.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog/your_version.xml new file mode 100644 index 0000000000..acec502870 --- /dev/null +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_viewNewFileDialog/your_version.xml @@ -0,0 +1,263 @@ +<?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> diff --git a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/scripts/BugEvent_sendNotification.xml b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/scripts/BugEvent_sendNotification.xml index d443a6914f..631a354429 100644 --- a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/scripts/BugEvent_sendNotification.xml +++ b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/scripts/BugEvent_sendNotification.xml @@ -105,7 +105,7 @@ body += """ Messages :\n simulation_state = (\'delivered\', \'started\')\n bug_message_list = [bug_message]\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 message_count = len(bug_message_list)+1\n 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.getStartDate(), message.getTextContent(\'\') )\n \n +recipient_list = bug_message.BugLine_getRecipientValueList()\n +\n portal = bug_message.getPortalObject()\n portal.portal_notifications.sendMessage(sender=bug_message.getSourceValue(),\n - recipient=bug_message.getDestinationValueList(), \n - subject="[Bug %s] %s" % (bug.getReference(), bug.getTitle()), \n + recipient=recipient_list,\n + subject="[Bug %s] %s" % (bug.getReference(), bug.getTitle()),\n message=body)\n </string> </value> </item> @@ -178,6 +180,7 @@ portal.portal_notifications.sendMessage(sender=bug_message.getSourceValue(),\n <string>message_count</string> <string>_getiter_</string> <string>message</string> + <string>recipient_list</string> <string>portal</string> </tuple> </value> diff --git a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/states/started.xml b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/states/started.xml index 77aa37fb22..addbfac69c 100644 --- a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/states/started.xml +++ b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/states/started.xml @@ -31,7 +31,7 @@ </item> <item> <key> <string>title</string> </key> - <value> <string>Posted</string> </value> + <value> <string>Send</string> </value> </item> <item> <key> <string>transitions</string> </key> diff --git a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/worklists.xml b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/worklists.xml index 3953ad0209..609a885c76 100644 --- a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/worklists.xml +++ b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/worklists.xml @@ -21,6 +21,12 @@ <dictionary/> </value> </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> <item> <key> <string>id</string> </key> <value> <string>worklists</string> </value> diff --git a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/worklists/01_planned_bug_line_list.xml b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/worklists/01_planned_bug_line_list.xml new file mode 100644 index 0000000000..bd8db42139 --- /dev/null +++ b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/worklists/01_planned_bug_line_list.xml @@ -0,0 +1,114 @@ +<?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> diff --git a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_workflow/scripts/Bug_sendNotification.xml b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_workflow/scripts/Bug_sendNotification.xml index 4ba6f91c9d..fbd311c76d 100644 --- a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_workflow/scripts/Bug_sendNotification.xml +++ b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_workflow/scripts/Bug_sendNotification.xml @@ -68,8 +68,15 @@ <value> <string encoding="cdata"><![CDATA[ bug = state_change["object"]\n -valid_transaction_list = ["confirm_action", "stop_action", \n - "deliver_action", "set_ready_action" , "cancel_action"]\n +history = bug.portal_workflow.getInfoFor(bug, \'history\',\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 message = [ h for h in state_change.getHistory() \\\n if h[\'action\'] in valid_transaction_list]\n @@ -78,13 +85,14 @@ comment = ""\n if len(message) > 0:\n comment=message[-1]["comment"]\n \n -line = bug.newContent(title="Bug %s was %s" % (bug.getReference(),\n - bug.getSimulationStateTitle()),\n - portal_type="Bug Line",\n - text_content=comment)\n -\n -# This will post The message Automatically.\n -line.start()\n +line = bug.newContent(title="Bug %s was %s" % (bug.getReference(), bug.getSimulationStateTitle()),\n + portal_type="Bug Line",\n + text_content=comment)\n +if send_event:\n + # This will post The message Automatically.\n + line.start()\n +else:\n + line.plan()\n ]]></string> </value> @@ -138,11 +146,14 @@ line.start()\n <string>state_change</string> <string>_getitem_</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>append</string> <string>$append0</string> - <string>_getiter_</string> - <string>_getattr_</string> <string>h</string> <string>message</string> <string>comment</string> diff --git a/bt5/erp5_forge/bt/change_log b/bt5/erp5_forge/bt/change_log index 8c57a5bbf8..a308ca4f0f 100644 --- a/bt5/erp5_forge/bt/change_log +++ b/bt5/erp5_forge/bt/change_log @@ -1,3 +1,9 @@ +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 * Improve domain tree mode of glossary term list. diff --git a/bt5/erp5_forge/bt/revision b/bt5/erp5_forge/bt/revision index cfd6ea5ae4..d61d31715d 100644 --- a/bt5/erp5_forge/bt/revision +++ b/bt5/erp5_forge/bt/revision @@ -1 +1 @@ -335 \ No newline at end of file +336 \ No newline at end of file -- 2.30.9