Edgewall Software
Modify

Ticket #2512 (closed defect: fixed)

Opened 6 years ago

Last modified 5 years ago

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

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

Description

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

Change History

comment:1 Changed 6 years ago by anonymous

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 Changed 6 years ago by cmlenz

  • Priority changed from normal to high

comment:3 Changed 6 years ago by cboos

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 Changed 6 years ago by cmlenz

  • Owner changed from jonas to cmlenz
  • Status changed from new to assigned

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 Changed 6 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from assigned to closed

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

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.