Edgewall Software

Ticket #2512 (closed defect: fixed)

Opened 3 years ago

Last modified 2 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:

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

Changed 3 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;

Changed 3 years ago by cmlenz

  • priority changed from normal to high

Changed 3 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?

Changed 3 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 ;-)

Changed 3 years ago by cmlenz

  • status changed from assigned to closed
  • resolution set to fixed

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

Add/Change #2512 (NULL values in severity field cause partial trac-admin <env> upgrade)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.