[Mpuls-commits] r3966 - in base/trunk: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Oct 12 14:53:51 CEST 2010


Author: roland
Date: 2010-10-12 14:53:50 +0200 (Tue, 12 Oct 2010)
New Revision: 3966

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/evaluation.py
Log:
issue1087: Show the statistics in minutes

Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-10-12 12:52:24 UTC (rev 3965)
+++ base/trunk/ChangeLog	2010-10-12 12:53:50 UTC (rev 3966)
@@ -1,5 +1,10 @@
 2010-10-12  Roland Geider <roland.geider at intevation.de>
 
+	* mpulsweb/lib/evaluation.py: issue1087: Show the statistics in
+	  minutes, not hours
+
+2010-10-12  Roland Geider <roland.geider at intevation.de>
+
 	* mpulsweb/public/styles/all.css: issue941: Show case number in the
 	  overview. Increase table width.
 

Modified: base/trunk/mpulsweb/lib/evaluation.py
===================================================================
--- base/trunk/mpulsweb/lib/evaluation.py	2010-10-12 12:52:24 UTC (rev 3965)
+++ base/trunk/mpulsweb/lib/evaluation.py	2010-10-12 12:53:50 UTC (rev 3966)
@@ -129,13 +129,13 @@
             
             for row in rows:
                 total['amount'] = total['amount'] + row[1]
-                total['time'] = total['time'] + timedelta_in_minutes(row[0]) / 60
+                total['time'] = total['time'] + timedelta_in_minutes(row[0])
             
             for row in rows:
                 if total['time']: # don't count if no time given
-                    percent = timedelta_in_minutes(row[0]) / total['time'] / 60 * 100.0
+                    percent = timedelta_in_minutes(row[0]) / total['time'] * 100.0
                     result['types'].append({'typ': row[2],
-                                'time' : timedelta_in_minutes(row[0]) / 60,
+                                'time' : timedelta_in_minutes(row[0]),
                                 'percent': percent,
                                 'amount' : row[1]})
             result['total'] = total



More information about the Mpuls-commits mailing list