[Erp5-report] r24033 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Oct 6 17:12:45 CEST 2008


Author: seb
Date: Mon Oct  6 17:12:40 2008
New Revision: 24033

URL: http://svn.erp5.org?rev=24033&view=rev
Log:
2008-10-06 Seb
* When displaying the last result of an alarm, sort the result in order
to see directly important results.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getReportResultList.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getReportResultList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getReportResultList.xml?rev=24033&r1=24032&r2=24033&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getReportResultList.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Alarm_getReportResultList.xml Mon Oct  6 17:12:40 2008
@@ -63,10 +63,14 @@
 else:\n
   active_process = context.getPortalObject().restrictedTraverse(active_process)\n
 \n
+result_list = []\n
+\n
 if active_process is not None:\n
-  return active_process.getResultList()\n
+  result_list = [x for x in active_process.getResultList()]\n
+  # High severity will be displayed first\n
+  result_list.sort(key=lambda x: -x.severity)\n
 \n
-return []\n
+return result_list\n
 </string> </value>
         </item>
         <item>
@@ -108,6 +112,11 @@
                             <string>None</string>
                             <string>_getattr_</string>
                             <string>context</string>
+                            <string>result_list</string>
+                            <string>append</string>
+                            <string>$append0</string>
+                            <string>_getiter_</string>
+                            <string>x</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=24033&r1=24032&r2=24033&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Mon Oct  6 17:12:40 2008
@@ -1,1 +1,1 @@
-973
+976




More information about the Erp5-report mailing list