[Mpuls-commits] r645 - in wasko/branches/1.0: . waskaweb/controllers waskaweb/public/xml

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 19 12:18:09 CEST 2009


Author: torsten
Date: 2009-10-19 12:18:07 +0200 (Mon, 19 Oct 2009)
New Revision: 645

Modified:
   wasko/branches/1.0/ChangeLog.txt
   wasko/branches/1.0/waskaweb/controllers/evaluate.py
   wasko/branches/1.0/waskaweb/public/xml/eval_zusammenfassung.xml
Log:
Issue542


Modified: wasko/branches/1.0/ChangeLog.txt
===================================================================
--- wasko/branches/1.0/ChangeLog.txt	2009-10-19 07:27:35 UTC (rev 644)
+++ wasko/branches/1.0/ChangeLog.txt	2009-10-19 10:18:07 UTC (rev 645)
@@ -8,6 +8,13 @@
 
 	* waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
 
+	Issue542
+
+	* waskaweb/controllers/evaluate.py: If art ending is given check if
+	the case was finished within the evaluation timeframe
+
+	* waskaweb/public/xml/eval_zusammenfassung.xml: Fixed syntax error. 
+
 2009-10-16	Torsten Irlaender	<torsten.irlaender at intevation.de> 
 
 	Set version to 1.1.0-rc2

Modified: wasko/branches/1.0/waskaweb/controllers/evaluate.py
===================================================================
--- wasko/branches/1.0/waskaweb/controllers/evaluate.py	2009-10-19 07:27:35 UTC (rev 644)
+++ wasko/branches/1.0/waskaweb/controllers/evaluate.py	2009-10-19 10:18:07 UTC (rev 645)
@@ -145,10 +145,13 @@
 
         # Type of ending
         ending = " TRUE " 
-        if params['ending']:
+        endingdate = " TRUE " 
+        if params['ending'] and params.get('start_date') != 'None' and params.get('end_date') != 'None':
+            enddatefield = g.mpuls_config.get('agency-fields-mapping', 'date_phase3_end')
+            endingdate = "( '%s'::date <= %s AND %s <= '%s'::date )" % (params['start_date'], enddatefield, enddatefield, params['end_date'])
             ending = "cm_end_art in ( %s )" % ", ".join(['%s' % e for e in params['ending']])
 
-        params['sql'] = "SELECT %%(fields)s from master_tbl_eval_total_view m WHERE %s AND %s" % ("".join(dates), ending)
+        params['sql'] = "SELECT %%(fields)s from master_tbl_eval_total_view m WHERE %s AND %s AND %s" % ("".join(dates), ending, endingdate)
 
         #Datefields
         if all_phases:

Modified: wasko/branches/1.0/waskaweb/public/xml/eval_zusammenfassung.xml
===================================================================
--- wasko/branches/1.0/waskaweb/public/xml/eval_zusammenfassung.xml	2009-10-19 07:27:35 UTC (rev 644)
+++ wasko/branches/1.0/waskaweb/public/xml/eval_zusammenfassung.xml	2009-10-19 10:18:07 UTC (rev 645)
@@ -140,7 +140,7 @@
     </ydim>
     <ydim>
       <label>davon erfolgreiche Beendigung</label>
-      <field>(select count(id) from  master_tbl_eval_total_view as anzahl</field>
+      <field>(select count(id) from  master_tbl_eval_total_view) as anzahl</field>
       <table>(select DISTINCT count(id) as id, 'Gesamt' as value from  master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>cm_end_art = 1</where>



More information about the Mpuls-commits mailing list