Edgewall Software
Modify

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

add_milestone.diff (547 bytes) - added by brad@… 7 years ago.
patch file
add_milestone.2.diff (542 bytes) - added by brad@… 7 years ago.
patch file (Try #2)

Download all attachments as: .zip

Change History

Changed 7 years ago by brad@…

patch file

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;

Changed 7 years ago by brad@…

patch file (Try #2)

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].

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cmlenz. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.