[Mpuls-commits] r395 - in wasko/trunk: . waskaweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Mar 18 12:00:19 CET 2009
Author: torsten
Date: 2009-03-18 12:00:17 +0100 (Wed, 18 Mar 2009)
New Revision: 395
Modified:
wasko/trunk/ChangeLog.txt
wasko/trunk/waskaweb/controllers/caselifetime.py
Log:
Fixed adding of comments to "Neuaufnahme"/"Wiederaufnahme"
Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt 2009-03-18 10:24:39 UTC (rev 394)
+++ wasko/trunk/ChangeLog.txt 2009-03-18 11:00:17 UTC (rev 395)
@@ -19,6 +19,11 @@
waskaweb/templates/caselifetime/overview.mako: Use dateconvert
function from helpers to display the date in the correct format.
+ Fixed adding of notes to "Anmerkungen Neuaufnahme/Wiederaufnahme"
+
+ * waskaweb/controllers/caselifetime.py: Added checks if the field is
+ inital empty
+
2009-03-17 Torsten Irlaender <torsten.irlaender at intevation.de>
Last snapshot before rc-candidate
Modified: wasko/trunk/waskaweb/controllers/caselifetime.py
===================================================================
--- wasko/trunk/waskaweb/controllers/caselifetime.py 2009-03-18 10:24:39 UTC (rev 394)
+++ wasko/trunk/waskaweb/controllers/caselifetime.py 2009-03-18 11:00:17 UTC (rev 395)
@@ -124,7 +124,7 @@
elif request.params.has_key('abort'):
return self.abortAction()
else:
- print "Unbekannt"
+ pass
c.form_navigation = self._getFormNavigation()
return render('/caselifetime/overview.mako')
@@ -163,14 +163,11 @@
form_result = {}
form_errors = {}
- print "extratime"
-
if c.num_verlaengerung < 1:
validator = ExtraTimeFormValidator1()
else:
validator = ExtraTimeFormValidator2()
- print request.params
try:
form_result = validator.to_python(request.params)
@@ -198,15 +195,20 @@
# for field in fieldsOfPhaseA and fieldsOfPhaseB:
# if field not in (nottocopyfields):
# data[field] = c.casedata.getData(field, '')
- data['cm2c_t'] = unicode(c.casedata.getData('cm2c_t', ''))
try:
# create new case
factory = CaseFactory()
case = factory.createNew(data={})
- # Füge alte params aus dem Dialog in der verwaltung hinzu und schreib in den neuen Fall
+ # Füge alte params aus dem Dialog in der verwaltung hinzu und
+ # schreib in den neuen Fall
+ data['cm2c'] = '1'
params = session.get('lifetimeparams', {})
- data['cm2c_t'] += "\r\n\r\n" + params.get('anmerkungen', '')
+ if unicode(c.casedata.getData('cm2c_t', '')) != 'None':
+ data['cm2c_t'] = unicode(c.casedata.getData('cm2c_t', ''))
+ data['cm2c_t'] += "\r\n\r\n" + params.get('anmerkungen', '')
+ else:
+ data['cm2c_t'] = params.get('anmerkungen', '')
del params['anmerkungen']
data.update(params)
c.casedata.setData(data, case.id)
@@ -237,17 +239,21 @@
data['cm_dok_datum_beendigung'] = dd_mm_YYYY(c.casedata.getData('datum_cm_ende'))
data['cm_dok_end_art'] = str(c.casedata.getData('cm_end_art'))
data['cm_dok_end_verm'] = str(c.casedata.getData('cm_end_verm'))
- #lösche alte abschlussbewertung und setze phase
+ #lösche alte abschlussbewertung und setze phase
if c.num_wiederaufnahme < 1:
data['cm_end_verm'] = '-1'
data['cm_end_art'] = '-1'
data['datum_cm_ende'] = ''
- data['cm2c_t'] = unicode(c.casedata.getData('cm2c_t', ''))
data['phase'] = '2'
+ data['cm2c'] = '1'
try:
- # Füge alte params aus dem Dialog in der verwaltung hinzu und schreibe alles weg
+ # Füge alte params aus dem Dialog in der verwaltung hinzu und schreibe alles weg
params = session.get('lifetimeparams', {})
- data['cm2c_t'] += "\r\n\r\n" + params.get('anmerkungen', '')
+ if unicode(c.casedata.getData('cm2c_t', '')) != 'None':
+ data['cm2c_t'] = unicode(c.casedata.getData('cm2c_t', ''))
+ data['cm2c_t'] += "\r\n\r\n" + params.get('anmerkungen', '')
+ else:
+ data['cm2c_t'] = params.get('anmerkungen', '')
del params['anmerkungen']
data.update(params)
c.casedata.setData(data)
@@ -269,11 +275,14 @@
c.form_navigation = self._getFormNavigation()
data = {}
if confirmed == '1':
- data['cm2c_t'] = unicode(c.casedata.getData('cm2c_t', ''))
try:
- # Füge alte params aus dem Dialog in der verwaltung hinzu und schreibe alles weg
+ # Füge alte params aus dem Dialog in der verwaltung hinzu und schreibe alles weg
params = session.get('lifetimeparams', {})
- data['cm2c_t'] += "\r\n\r\n" + params.get('anmerkungen', '')
+ if unicode(c.casedata.getData('cm2c_t', '')) != 'None':
+ data['cm2c_t'] = unicode(c.casedata.getData('cm2c_t', ''))
+ data['cm2c_t'] += "\r\n\r\n" + params.get('anmerkungen', '')
+ else:
+ data['cm2c_t'] = params.get('anmerkungen', '')
del params['anmerkungen']
data.update(params)
c.casedata.setData(data)
@@ -298,13 +307,9 @@
form_result = {}
form_errors = {}
- print "reopen"
-
if c.num_wiederaufnahme < 1:
- print "1. reopen"
validator = ReopenFormValidator1()
else:
- print "2. reopen"
validator = ReopenFormValidator2()
try:
More information about the Mpuls-commits
mailing list