Commit b1ebb351 authored by Nicolas Delaby's avatar Nicolas Delaby

Enhance notification message: display attachment list

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23366 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 83f97616
...@@ -73,6 +73,7 @@ history = bug.portal_workflow.getInfoFor(bug, \'history\',\n ...@@ -73,6 +73,7 @@ history = bug.portal_workflow.getInfoFor(bug, \'history\',\n
for history_item in history[::-1]:\n for history_item in history[::-1]:\n
if history_item[\'action\'].endswith(\'action\'):\n if history_item[\'action\'].endswith(\'action\'):\n
send_event = history_item[\'send_event\']\n send_event = history_item[\'send_event\']\n
is_re_assign_action = bool(history_item[\'action\'] == \'re_assign_action\')\n
break\n break\n
\n \n
valid_transaction_list = ["confirm_action", "stop_action",\n valid_transaction_list = ["confirm_action", "stop_action",\n
...@@ -85,7 +86,12 @@ comment = ""\n ...@@ -85,7 +86,12 @@ 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(), bug.getSimulationStateTitle()),\n state = bug.getSimulationStateTitle()\n
if is_re_assign_action:\n
state = \'Re %s\' % (state)\n
line = bug.newContent(title="%s %s was %s" % (bug.getPortalType(),\n
bug.getReference(),\n
state),\n
portal_type="Bug Line",\n portal_type="Bug Line",\n
text_content=comment)\n text_content=comment)\n
if send_event:\n if send_event:\n
...@@ -151,6 +157,8 @@ else:\n ...@@ -151,6 +157,8 @@ else:\n
<string>_getiter_</string> <string>_getiter_</string>
<string>history_item</string> <string>history_item</string>
<string>send_event</string> <string>send_event</string>
<string>bool</string>
<string>is_re_assign_action</string>
<string>valid_transaction_list</string> <string>valid_transaction_list</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
...@@ -158,6 +166,7 @@ else:\n ...@@ -158,6 +166,7 @@ else:\n
<string>message</string> <string>message</string>
<string>comment</string> <string>comment</string>
<string>len</string> <string>len</string>
<string>state</string>
<string>line</string> <string>line</string>
</tuple> </tuple>
</value> </value>
......
347 348
\ 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