[Mpuls-commits] r132 - in waska/trunk: . formed waskaweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Sep 3 18:47:28 CEST 2008


Author: teichmann
Date: 2008-09-03 18:47:27 +0200 (Wed, 03 Sep 2008)
New Revision: 132

Modified:
   waska/trunk/ChangeLog.txt
   waska/trunk/formed/formedtree_web.xml
   waska/trunk/waskaweb/model/phase_transition.py
Log:
Phasen: Added missing transition.


Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt	2008-09-03 16:14:06 UTC (rev 131)
+++ waska/trunk/ChangeLog.txt	2008-09-03 16:47:27 UTC (rev 132)
@@ -1,5 +1,11 @@
 2008-09-03  Sascha L. Teichmann <sascha.teichmann at intevation.de>
 
+	* waskaweb/model/phase_transition.py: Added missing transition.
+
+	* formed/formedtree_web.xml: Added times for nachbetreuung.
+
+2008-09-03  Sascha L. Teichmann <sascha.teichmann at intevation.de>
+
 	Sum up times in phases
 
 	* waskaweb/model/phases_factory.py: Fix bug in accessing time

Modified: waska/trunk/formed/formedtree_web.xml
===================================================================
--- waska/trunk/formed/formedtree_web.xml	2008-09-03 16:14:06 UTC (rev 131)
+++ waska/trunk/formed/formedtree_web.xml	2008-09-03 16:47:27 UTC (rev 132)
@@ -8,8 +8,8 @@
       <bool description="Klärung beendet" name="klaerung_ende" value="1"/>
       <bool description="Case-Management läuft" name="cm_start" value="2"/>
       <bool description="Case-Management beendet" name="cm_ende" value="3"/>
-      <bool description="Nachbetreuung läuft" name="nb_start" value="4"/>
-      <bool description="Nachbetreuung beendet" name="nb_ende" value="5"/>
+      <bool description="Nachbetreuung läuft" name="nachbetreuung_start" value="4"/>
+      <bool description="Nachbetreuung beendet" name="nachbetreuung_ende" value="5"/>
       <bool description="Beratung läuft" name="clearing_start" value="6"/>
       <bool description="Beratung beendet" name="clearing_ende" value="7"/>
     </choice>
@@ -518,7 +518,7 @@
             <bool description="Nein" name="Nein" value="0"/>
           </choice>
           <date description="Datum der Entscheidung"
-	  flags="required:clearing_ende,beratung_start,cm_start;time:clearing_ende,cm_start" name="datum_feststellung" target="a:50"/>
+	  flags="required:clearing_ende,beratung_start,cm_start;time:clearing_ende,cm_start,beratung_start" name="datum_feststellung" target="a:50"/>
         </group>
         <group containers="a" description="Case-Management-Fall" name="case_management_fall" target="c">
           <choice description="Kompetenzfeststellung ist erforderlich mit folgender primärer Zielsetzung" formularname="Zielsetzung" name="zielsetzung" size="1" target="a">
@@ -1449,7 +1449,7 @@
           <int description="Zeitraum CM (in Wochen)" flags="evaluation" formularname="Zeitraum_Fallmanagement" maxvalue="250" minvalue="0" name="zeitraum_fallmanagement" target="b"/>
         </group>
         <group containers="a,b,c" description="Angaben zur Beendigung des CM" name="angabenzurbeendigungdescm" target="c">
-          <date description="Beendigung CM (Datum)" flags="required:cm_ende,nb_start;time:cm_ende" formularname="Beendigung" name="beendigung_5" target="a"/>
+          <date description="Beendigung CM (Datum)" flags="required:cm_ende,nachbetreuung_start;time:cm_ende,nachbetreuung_start" formularname="Beendigung" name="beendigung_5" target="a"/>
           <choice description="Art der Beendigung" flags="evaluation;required:cm_ende" formularname="Art_Beendigung" name="art_beendigung" size="1" target="a">
             <bool checked="s" description="Keine Angabe" name="keineangabe" value="-1"/>
             <bool description="vorzeitige Beendigung" name="vorzeitig" value="2"/>
@@ -1596,7 +1596,7 @@
               <text description="Sonstiges" formularname="Kategorien_Sonstiges_Nennung" maxlength="60" name="kategorien_sonstiges_nennung" size="40" target="h"/>
             </group>
             <group containers="a,b" description="Eingliederung" name="eingliederung" target="d">
-              <date description="Datum des Ende der Nachbetreuung" flags="required:nb_ende" name="beendigung_nachbetreuung" target="a:25"/>
+              <date description="Datum des Ende der Nachbetreuung" flags="required:nachbetreuung_ende;time:nachbetreuung_ende" name="beendigung_nachbetreuung" target="a:25"/>
               <choice description="Zeitraum der Nachbetreuung" formularname="Zeitraum_Nachbetreuung" name="zeitraum_nachbetreuung" size="1" target="a">
                 <bool checked="s" description="Keine Angabe" name="keineangabe" value="-1"/>
                 <bool description="bis zu 1 Monat" name="biszu1monat" value="0"/>

Modified: waska/trunk/waskaweb/model/phase_transition.py
===================================================================
--- waska/trunk/waskaweb/model/phase_transition.py	2008-09-03 16:14:06 UTC (rev 131)
+++ waska/trunk/waskaweb/model/phase_transition.py	2008-09-03 16:47:27 UTC (rev 132)
@@ -28,6 +28,8 @@
 # Sascha L. Teichmann <sascha.teichmann at intevation.de>
 #
 
+import sys
+
 UNKNOWN        = -1
 CLEAR_START    =  0
 CLEAR_ENDE     =  1
@@ -72,6 +74,7 @@
     BERATUNG_START: [BERATUNG_ENDE],
     BERATUNG_ENDE : [],
     CM_ENDE       : [NB_START],
+    NB_START      : [NB_ENDE],
     NB_ENDE       : []
 }
 
@@ -96,10 +99,9 @@
 
 def phase_neighbors(phase1, phase2):
     try:
-        succs1 = PHASE_SUCCESSORS[phase1]
-        if phase2 in succs1: return true
-        return phase1 in PHASE_SUCCESSORS[phase2]
-    except KeyError:
-        return false
+        return phase2 in PHASE_SUCCESSORS[phase1] or phase1 in PHASE_SUCCESSORS[phase2]
+    except KeyError, ke:
+        print >> sys.stderr, "missing key in phase_neighbors:", ke
+        return False
 
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8:



More information about the Mpuls-commits mailing list