Message1829
One of our tracker users tried to submit an issue with
a due date (DateHTMLProperty) set to *asap* (not really
a due date if you ask me). As expected, RoundUp didn't
accept it, but unfortunately doesn't it give an error
message in the *error_message* block (the red error
bar), but it came with a *Templating Error* (see below).
Wouldn't it be nicer if the date format error was
displayed in the error message block?
FYI:
On the server where the problem occurred we use roundup
release is 0.7.9 with python 2.3.3 on Linux.
**************************************
Templating Error
exceptions.ValueError: 'asap' not a date spec
([yyyy]-[mm]-[dd].[H]H:MM[:SS.SSS][offset])
Debugging information follows
1. In python expression
"context.due_date.field(format='%Y-%m-%d')"
2. While evaluating the expression on line 216
Current variables:
templates <roundup.cgi.templating.Templates
instance at 0x4072074c>
repeat
<roundup.cgi.PageTemplates.TALES.SafeMapping instance
at 0x4071f9ac>
context <HTMLClass(0x4072092c) issue>
default <roundup.cgi.PageTemplates.TALES.Default
instance at 0x4068162c>
db <roundup.cgi.templating.HTMLDatabase instance
at 0x407204cc>
utils <roundup.cgi.templating.utils instance at
0x407203cc>
request <roundup.cgi.templating.HTMLRequest
instance at 0x40714f2c>
tracker <module '_roundup_tracker_1' from
'/mnt/data0/RoundUp/SDT/__init__.pyo'>
template <Roundup PageTemplate 'issue.edit.html'>
nothing None
config <module '_roundup_tracker_1.config' from
'/mnt/data0/RoundUp/SDT/config.pyo'>
options {'ok_message': [], 'error_message':
["Error: property due_date: 'asap' is an invalid date
('asap' not a date spec
([yyyy]-[mm]-[dd].[H]H:MM[:SS.SSS][offset]))"]}
loop <roundup.cgi.PageTemplates.TALES.SafeMapping
instance at 0x4071f9ac>
selected_product '9'
attrs {'tal:content': "structure python:
context.due_date.field(format='%Y-%m-%d')", 'nowrap': None}
perm None
3. A problem occurred in your template
"issue.edit.html".
Full traceback:
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/roundup/cgi/client.py",
line 527, in renderContext
result = pt.render(self, None, None, **args)
File
"/usr/lib/python2.3/site-packages/roundup/cgi/templating.py",
line 246, in render
getEngine().getContext(c), output, tal=1,
strictinsert=0)()
File
"/usr/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 154, in __call__
self.interpret(self.program)
File
"/usr/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 186, in interpret
handlers[opcode](self, args)
File
"/usr/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 491, in do_condition
self.interpret(block)
File
"/usr/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 186, in interpret
handlers[opcode](self, args)
File
"/usr/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 432, in do_insertStructure_tal
structure = self.engine.evaluateStructure(expr)
File
"/usr/lib/python2.3/site-packages/roundup/cgi/PageTemplates/TALES.py",
line 226, in evaluate
v = expression(self)
File
"/usr/lib/python2.3/site-packages/roundup/cgi/PageTemplates/PythonExpr.py",
line 72, in __call__
return f()
File "<string>", line 2, in f
File
"/usr/lib/python2.3/site-packages/roundup/cgi/templating.py",
line 1382, in field
value = date.Date(self._value).pretty(format)
File
"/usr/lib/python2.3/site-packages/roundup/date.py",
line 128, in __init__
self.set(spec, offset=offset,
add_granularity=add_granularity)
File
"/usr/lib/python2.3/site-packages/roundup/date.py",
line 226, in set
raise ValueError, _('%r not a date spec (%s)')%(spec,
ValueError: 'asap' not a date spec
([yyyy]-[mm]-[dd].[H]H:MM[:SS.SSS][offset]) |
|
Date |
User |
Action |
Args |
2009-02-03 14:21:09 | admin | link | issue1102165 messages |
2009-02-03 14:21:09 | admin | create | |
|