#12882 closed defect (fixed)
TracError is not raised even if <action>.set_resolution is empty
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.17 |
Component: | ticket system | Version: | 1.0 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Improve validations for |
||
API Changes: | |||
Internal Changes: |
Description
At tags/trac-1.0.15/trac/ticket/default_workflow.py@:280-281,284#L278, it seems TracError
with the following message is raised if resolutions specified in set_resolution
attribute are not available.
Your workflow attempts to set a resolution but none is defined (configuration issue, please contact your Trac admin).
However, the exception is not actually raised because the following expression would be ['']
, not an empty list.
resolutions = [x.strip() for x in this_action['set_resolution'].split(',')]
>>> this_action = {'set_resolution': ''} >>> [x.strip() for x in this_action['set_resolution'].split(',')] ['']
Another issue, I think we should ignore undefined resolutions specified in the set_resolution
attribute. Currently, any values can be specified in.
Attachments (0)
Change History (6)
comment:1 by , 7 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
Checking for valid resolutions is a good idea. I documented the constraint in TracWorkflow@74.
Two notes:
comment:3 by , 7 years ago
Thanks. That makes sense.
Revised branch and created branches for 1.2-stable and trunk:
- jomae.git@t12882 for 1.0-stable
- jomae.git@t12882+1.2
- jomae.git@t12882+trunk
comment:5 by , 7 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Committed in [16253] and merged in [16254-16255].
Proposed changes in [4fc9ed549/jomae.git] (jomae.git@t12882).