Ticket #800 (closed defect: fixed)
Opened 7 years ago
Last modified 5 years ago
'Add New Milestone' not working
| Reported by: | Brad Anderson <brad@…> | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | high | Milestone: | 0.8 |
| Component: | roadmap | Version: | devel |
| Severity: | critical | Keywords: | |
| Cc: | brad@… | ||
| Release Notes: | |||
| API Changes: | |||
Description
I pulled Revision 940 to my local and was unable to create a new milestone. The problem was that the 'id' variable in Milestone.py was not being set to a default of -1 by the dictionary's get() method.
I'm a total Python newbie, so someone needs to check if the patch is a) in the right place, and b) the proper Python way. I don't think removing the hidden field name="id" on the html form is the way, because at times, it's filled with the milestone name for other modes.
Attachments
Change History
Changed 7 years ago by brad@…
- Attachment add_milestone.diff added
comment:1 Changed 7 years ago by Brad Anderson <brad@…>
Oops, forgot some particulars:
Gentoo Linux (2.6.6 kernel)
Python 2.3.3
mod_python
anything else?
comment:2 Changed 7 years ago by cmlenz
- Milestone set to 0.8
- Priority changed from normal to high
- Severity changed from normal to critical
- Status changed from new to assigned
comment:3 Changed 7 years ago by Brad Anderson <brad@…>
I was getting an error with the patch, something like
TypeError: len() of unsized object
So I changed the check to:
if id == "": id = -1;
comment:4 Changed 7 years ago by jonas
test
comment:5 Changed 7 years ago by jonas
test2
comment:6 Changed 7 years ago by cmlenz
- Resolution set to fixed
- Status changed from assigned to closed
Fixed in [941].



patch file