[Mpuls-commits] r126 - in waska/trunk: . waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Sep 3 15:14:02 CEST 2008


Author: torsten
Date: 2008-09-03 15:14:01 +0200 (Wed, 03 Sep 2008)
New Revision: 126

Modified:
   waska/trunk/ChangeLog.txt
   waska/trunk/waskaweb/lib/evaluation.py
   waska/trunk/waskaweb/lib/search.py
Log:
Adjusted evaluation to the new clearing phase


Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt	2008-09-03 12:58:02 UTC (rev 125)
+++ waska/trunk/ChangeLog.txt	2008-09-03 13:14:01 UTC (rev 126)
@@ -33,6 +33,13 @@
 
 	* formed/formedtree_web.xml: Added new phase "clearing"
 
+	Adjusted evaluation to the new clearing phase
+
+	* waskaweb/lib/search.py,
+	  waskaweb/lib/evaluation.py: Beratung becomes clearing. added new
+	  beratung. Changed search options regarding beratung 
+	  phase. Adjusted evaluation of cm/beratung. 
+
 2008-09-02  Sascha L. Teichmann <sascha.teichmann at intevation.de>
 
 	Partial XLS export

Modified: waska/trunk/waskaweb/lib/evaluation.py
===================================================================
--- waska/trunk/waskaweb/lib/evaluation.py	2008-09-03 12:58:02 UTC (rev 125)
+++ waska/trunk/waskaweb/lib/evaluation.py	2008-09-03 13:14:01 UTC (rev 126)
@@ -62,7 +62,7 @@
                 self.total_valid = c1.fetchone()[0]
 
                 # All "beratungsfälle" (valid)
-                c1.execute("""SELECT count(id) from master_tbl_eval_total_view m WHERE phase IN (1,2) AND %s""" % self.where_clause(self.compressed_ids))
+                c1.execute("""SELECT count(id) from master_tbl_eval_total_view m WHERE phase IN (5,6) AND %s""" % self.where_clause(self.compressed_ids))
                 self.total_valid_beratung = c1.fetchone()[0]
 
                 # All "cm-fälle" (valid)
@@ -105,12 +105,14 @@
         #cm-state
         cm = 'TRUE' #default
         cm_state = options.get('cm', "all")
+        if cm_state == 'clearing':
+            cm = 'm.id in (SELECT id from master_tbl_eval_total_view WHERE phase in (0,1))'
         if cm_state == 'before':
-            cm = 'm.id not in (SELECT id from master_tbl_eval_total_view where phase in (0,1))'
+            cm = 'm.id in (SELECT id from master_tbl_eval_total_view WHERE phase in (6,7))'
         if cm_state == 'active':
             cm = 'm.id in (SELECT id from master_tbl_eval_incm_view WHERE phase = 2)'
         if cm_state == 'finished':
-            cm = 'm.id in (SELECT id from master_tbl_eval_incm_view WHERE phase in (3,4,5))'
+            cm = 'm.id in (SELECT id from master_tbl_eval_incm_view WHERE phase IN (3,4,5))'
 
         time_interval = "TRUE"
         interval_start_field = options.get('interval_start_field', "erstgespraech")

Modified: waska/trunk/waskaweb/lib/search.py
===================================================================
--- waska/trunk/waskaweb/lib/search.py	2008-09-03 12:58:02 UTC (rev 125)
+++ waska/trunk/waskaweb/lib/search.py	2008-09-03 13:14:01 UTC (rev 126)
@@ -166,8 +166,10 @@
         #cm-state
         cm = 'TRUE' #default
         cm_state = options.get('cm', "all")
+        if cm_state == 'clearing':
+            cm = 'm.id in (SELECT id from master_tbl_eval_total_view WHERE phase in (0,1))'
         if cm_state == 'before':
-            cm = 'm.id not in (SELECT id from master_tbl_eval_incm_view)'
+            cm = 'm.id in (SELECT id from master_tbl_eval_total_view WHERE phase in (6,7))'
         if cm_state == 'active':
             cm = 'm.id in (SELECT id from master_tbl_eval_incm_view WHERE phase = 2)'
         if cm_state == 'finished':
@@ -248,8 +250,10 @@
         #cm-state
         cm = 'TRUE' #default
         cm_state = options.get('cm', "all")
+        if cm_state == 'clearing':
+            cm = 'm.id in (SELECT id from master_tbl_eval_total_view WHERE phase in (0,1))'
         if cm_state == 'before':
-            cm = 'm.id not in (SELECT id from master_tbl_eval_incm_view)'
+            cm = 'm.id in (SELECT id from master_tbl_eval_total_view WHERE phase in (6,7))'
         if cm_state == 'active':
             cm = 'm.id in (SELECT id from master_tbl_eval_incm_view WHERE phase = 2)'
         if cm_state == 'finished':



More information about the Mpuls-commits mailing list