Edgewall Software

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#2512 closed defect (fixed)

NULL values in severity field cause partial trac-admin <env> upgrade

Reported by: aroach@… Owned by: Christopher Lenz
Priority: high Milestone: 0.9.3
Component: general Version: 0.9.2
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


Upgrading from 0.8.4 to 0.9.2 and moving from sqlite 2 to sqlite 3

If the 'severity' field in the ticket table has null values, the trac-admin <env> upgrade script does not carry forward those records.

The upgrade script that contains this issue is: http://projects.edgewall.com/trac/browser/trunk/trac/upgrades/db13.py

<claw> cmlenz: I think the records that I'm missing have severity as NULL, and the queries in db13.py only look for = 'enhancement' and <> 'enhancement'; does that make sense?
<cmlenz> hmm, that sounds like it might be the problem
<cmlenz> try "WHERE COALESCE(severity, '') <> 'enhancement'" in db13.py (line 30)

I think the way that I got into this problem is because I had modified the newticket.cs template to not display the "Ticket Properties" section. This must have allowed the Severity to not be included in the SQL INSERT for a new ticket.

Attachments (0)

Change History (5)

comment:1 by anonymous, 16 years ago

You can workaround this but updating your severity column before doing the trac-admin <env> upgrade.

UPDATE ticket
SET severity = 'enhancement'
WHERE severity IS NULL;

comment:2 by Christopher Lenz, 16 years ago

Priority: normalhigh

comment:3 by Christian Boos, 16 years ago

Should I take care of this one, or have you (cmlenz) already started something? If yes, should we fix db13.py, create a new one, or both?

comment:4 by Christopher Lenz, 16 years ago

Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned

I'll take this. We definitely need to change db13.py, because otherwise the tickets will be gone when any additional upgrade scripts may be reached ;-)

comment:5 by Christopher Lenz, 16 years ago

Resolution: fixed
Status: assignedclosed

Should be fixed in [2714], [2715].

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.