From db4546484886c4013f58bd55be511fa2700ee3c8 Mon Sep 17 00:00:00 2001 From: Rafael Monnerat <rafael@nexedi.com> Date: Tue, 12 Aug 2008 17:02:17 +0000 Subject: [PATCH] - Fix BugLine_view. - Improved a bit the notification messages. - Update few xml format git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22972 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_skins/erp5_forge/BugLine_view.xml | 21 +++++++------------ .../portal_workflow/bug_event_workflow.xml | 6 ++++++ .../scripts/BugEvent_checkConsistency.xml | 6 ------ .../scripts/BugEvent_sendNotification.xml | 16 +++----------- .../scripts/Bug_sendNotification.xml | 13 ++++-------- .../bug_workflow/states/delivered.xml | 9 +------- .../bug_workflow/transitions/cancel.xml | 4 ++-- bt5/erp5_forge/bt/revision | 2 +- 8 files changed, 24 insertions(+), 53 deletions(-) diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/BugLine_view.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/BugLine_view.xml index 9a29d80f46..7a8919c4c9 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/BugLine_view.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/BugLine_view.xml @@ -42,12 +42,6 @@ <tuple/> </value> </item> - <item> - <key> <string>_owner</string> </key> - <value> - <none/> - </value> - </item> <item> <key> <string>action</string> </key> <value> <string>Base_edit</string> </value> @@ -87,7 +81,7 @@ <value> <dictionary> <item> - <key> <string>bottom</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>my_text_content</string> @@ -95,34 +89,33 @@ </value> </item> <item> - <key> <string>center</string> </key> + <key> <string>center</string> </key> <value> <list/> </value> </item> <item> - <key> <string>hidden</string> </key> + <key> <string>hidden</string> </key> <value> <list/> </value> </item> <item> - <key> <string>left</string> </key> + <key> <string>left</string> </key> <value> <list> <string>my_title</string> - <string>my_causality_title</string> <string>my_start_date</string> - <string>my_translated_simulation_state_title</string> </list> </value> </item> <item> - <key> <string>right</string> </key> + <key> <string>right</string> </key> <value> <list> <string>my_source_title</string> <string>my_destination_title_list</string> + <string>my_translated_simulation_state_title</string> </list> </value> </item> @@ -155,7 +148,7 @@ </item> <item> <key> <string>title</string> </key> - <value> <string>Bug Line</string> </value> + <value> <string></string> </value> </item> <item> <key> <string>unicode_mode</string> </key> diff --git a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow.xml b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow.xml index c13279d831..b573ceebaf 100644 --- a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow.xml +++ b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow.xml @@ -21,6 +21,12 @@ <tuple/> </value> </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> <item> <key> <string>creation_guard</string> </key> <value> diff --git a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/scripts/BugEvent_checkConsistency.xml b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/scripts/BugEvent_checkConsistency.xml index e03e5a7e53..9f371bf215 100644 --- a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/scripts/BugEvent_checkConsistency.xml +++ b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_event_workflow/scripts/BugEvent_checkConsistency.xml @@ -81,12 +81,6 @@ event.Base_checkConsistency()\n <none/> </value> </item> - <item> - <key> <string>_owner</string> </key> - <value> - <none/> - </value> - </item> <item> <key> <string>_params</string> </key> <value> <string>state_change</string> </value> 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 4e91b5176f..c08f726227 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 @@ -70,12 +70,10 @@ body = """\n Reporter: %s\n Date: %s\n -Follow Up: %s\n \n Bug Message:\n \n -""" % (bug_message.getSourceTitle(\'\'), bug_message.getStartDate(\'\'), \n - bug_message.getFollowUpTitle(\'\'))\n +""" % (bug_message.getSourceTitle(\'\'), bug_message.getStartDate(\'\'))\n \n #XXX This does not support structured text format.\n body += bug_message.getTextContent("") \n @@ -99,15 +97,13 @@ if bug.getSourceTitle() is not None:\n """ % (bug.getDestinationTitle(\'\'), bug.getSourceTitle(\'\'),\n bug.getSourceTradeTitle(\'\'))\n \n -body += """ Link: %s\n +body += """ Link: %s\n Request Project: %s\n Assigned Project: %s\n - Follow Up: %s\n Description: \n %s\n """ % (bug.getAbsoluteUrl(), bug.getDestinationProjectTitle(\'\'), \n - bug.getSourceProjectTitle(\'\'), \n - \' / \'.join(bug.getFollowUpTitleList(\'\')), bug.getDescription(\'\'))\n + bug.getSourceProjectTitle(\'\'), bug.getDescription(\'\'))\n \n body += """\n +---------------------- Messages Related -----------------------+\n @@ -142,12 +138,6 @@ portal.portal_notifications.sendMessage(sender=bug_message.getSourceValue(),\n <none/> </value> </item> - <item> - <key> <string>_owner</string> </key> - <value> - <none/> - </value> - </item> <item> <key> <string>_params</string> </key> <value> <string>state_change</string> </value> 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 098dff137a..4ba6f91c9d 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 @@ -69,16 +69,17 @@ bug = state_change["object"]\n valid_transaction_list = ["confirm_action", "stop_action", \n - "deliver_action", "set_ready_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 \n comment = ""\n if len(message) > 0:\n - comment=message[-1]["comment"] \n + comment=message[-1]["comment"]\n \n -line = bug.newContent(title="This bug was %s" % bug.getSimulationStateTitle(),\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 @@ -100,12 +101,6 @@ line.start()\n <none/> </value> </item> - <item> - <key> <string>_owner</string> </key> - <value> - <none/> - </value> - </item> <item> <key> <string>_params</string> </key> <value> <string>state_change</string> </value> diff --git a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_workflow/states/delivered.xml b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_workflow/states/delivered.xml index 4cfc0738f5..7f61765b1f 100644 --- a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_workflow/states/delivered.xml +++ b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_workflow/states/delivered.xml @@ -73,18 +73,11 @@ </tuple> </value> </item> - <item> - <key> <string>Add Content Type Registrys</string> </key> - <value> - <tuple> - <string>Manager</string> - </tuple> - </value> - </item> <item> <key> <string>Add portal content</string> </key> <value> <tuple> + <string>Assignor</string> <string>Manager</string> </tuple> </value> diff --git a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_workflow/transitions/cancel.xml b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_workflow/transitions/cancel.xml index d587d4b568..56ed8ea113 100644 --- a/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_workflow/transitions/cancel.xml +++ b/bt5/erp5_forge/WorkflowTemplateItem/portal_workflow/bug_workflow/transitions/cancel.xml @@ -29,7 +29,7 @@ </item> <item> <key> <string>after_script_name</string> </key> - <value> <string></string> </value> + <value> <string>Bug_sendNotification</string> </value> </item> <item> <key> <string>description</string> </key> @@ -51,7 +51,7 @@ </item> <item> <key> <string>script_name</string> </key> - <value> <string>Bug_sendNotification</string> </value> + <value> <string></string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_forge/bt/revision b/bt5/erp5_forge/bt/revision index 2c136b29b5..0e92c3c0fc 100644 --- a/bt5/erp5_forge/bt/revision +++ b/bt5/erp5_forge/bt/revision @@ -1 +1 @@ -302 \ No newline at end of file +306 \ No newline at end of file -- 2.30.9