
On Tue, Dec 30, 2008 at 1:43 PM, Ben Artin <macdev@artins.org> wrote:
In article <24b520d20812300954u8a15d27y6df83b7ab1a4581d@mail.gmail.com>, "Doug Gregor" <doug.gregor@gmail.com> wrote:
If someone with access to the Trac server could tell me what you get when you run
echo 'select time,changetime from ticket where id=10;' | sqlite3 tracenv/db/trac.db
where tracenv is the path to your Trac environment, I can probably tell you why Trac is losing and how to fix it.
Here's the result:
-bash-3.00$ echo 'select time,changetime from ticket where id=10;' | sqlite3 /opt/trac/boost/db/trac.db 1005174885|
OK, the issue is that the changetime field on that ticket is blank for some reason. It can be fixed up:
1. Make a backup of the trac.db file. 2.
echo 'update ticket set changetime = (select max(tc.time) from ticket_change as tc where ticket=id) where changetime="" or changetime is null;' | sqlite3 tracenv/db/trac.db
echo 'update ticket set changetime = time where changetime is null;' | sqlite3 tracenv/db/trac.db
This will fix changetimes on all tickets that have blank changetimes now, and the web UI will stop crapping out
Hope this helps.
Success! Thank you very, very much. - Doug