[Mpuls-commits] r1751 - wasko/branches/2.0/mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Feb 24 15:36:57 CET 2010
Author: torsten
Date: 2010-02-24 15:36:57 +0100 (Wed, 24 Feb 2010)
New Revision: 1751
Modified:
wasko/branches/2.0/mpulsweb/model/phase.py
Log:
* mpulsweb/model/phase.py: Load phase relevant date for phasepart.
Modified: wasko/branches/2.0/mpulsweb/model/phase.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/phase.py 2010-02-24 14:31:49 UTC (rev 1750)
+++ wasko/branches/2.0/mpulsweb/model/phase.py 2010-02-24 14:36:57 UTC (rev 1751)
@@ -66,6 +66,7 @@
def __init__(self, id, it):
self.id = id
self.active = False
+ self.date = None
self.fields = []
pfields = g.mpuls_config.get('phases', 'fields')[0]
for phasepart, fields in pfields.iteritems():
@@ -83,6 +84,16 @@
field = it.getItem(realid)
self.active = field.getValue() == int(self.id)
+ # Get date on which this phasepart was started
+ pdates = g.mpuls_config.get('phases', 'dates')
+ for dates in pdates:
+ for phasepart, field in dates.iteritems():
+ if phasepart == id:
+ log.debug(field)
+ realid = "%s:%s" % (field, case_id)
+ field = it.getItem(realid)
+ self.date = field.getValue()
+
def getLinks(self):
out = []
if len(self.fields) > 0:
@@ -93,7 +104,7 @@
return ", ".join(out)
def getTime(self):
- return ""
+ return self.date
def is_active(self):
return self.active
More information about the Mpuls-commits
mailing list