id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,branch,changelog,apichanges,internalchanges 10858,delete ticket change fails if it contains a modification of a custom field no longer defined,Christian Boos,Christian Boos,"==== How to Reproduce ==== While doing a POST operation on `/ticket/255`, Trac issued an internal error (`OperationalError: no such column: test_five`) Request parameters: {{{ {'__FORM_TOKEN': u'f146ad994605e1310e6110f1', 'action': u'delete-comment', 'cdate': u'1340278350970000', 'cnum': u'14', 'id': u'255'} }}} User agent: `Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.56 Safari/537.4` ==== System Information ==== || '''`Trac`''' || `1.1.1dev-r0` || || '''`Babel`''' || `0.9.6dev-r0` || || '''`Docutils`''' || `0.9.1` || || '''`Genshi`''' || `0.6.1dev-r0 (without speedups)` || || '''`GIT`''' || `1.7.7.msysgit.0` || || '''`Mercurial`''' || `2.3.1+1-4b25077ae7ee` || || '''`Pygments`''' || `1.4` || || '''`pysqlite`''' || `2.6.3` || || '''`Python`''' || `2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]` || || '''`pytz`''' || `2011h` || || '''`setuptools`''' || `0.6` || || '''`SQLite`''' || `3.7.6.2` || || '''`Subversion`''' || `1.7.6 (r1370777)` || || '''`jQuery`''' || `1.7.2` || ==== Enabled Plugins ==== || '''`graphviz`''' || `0.13.0.6` || || '''`MilestoneOperation`''' || `Rev` || || '''`MyPage`''' || `0.13.0.0dev` || || '''`new-ticket-in-milestone`''' || `r6326 ` || || '''`TracMercurial`''' || `1.0.0.1dev` || || '''`TracWikiExtras`''' || `0.13.2dev-r10635` || || '''`vulnerability-tickets`''' || `r6669 ` || ==== Python Traceback ==== {{{ Traceback (most recent call last): File ""c:\Trac\repos\trunk\trac\web\main.py"", line 497, in _dispatch_request dispatcher.dispatch(req) File ""c:\Trac\repos\trunk\trac\web\main.py"", line 214, in dispatch resp = chosen_handler.process_request(req) File ""c:\Trac\repos\trunk\tracopt\ticket\deleter.py"", line 146, in process_request ticket.delete_change(cdate=cdate) File ""c:\Trac\repos\trunk\trac\ticket\model.py"", line 531, in delete_change % field, (oldvalue, self.id)) File ""c:\Trac\repos\trunk\trac\db\util.py"", line 121, in execute cursor.execute(query, params) File ""c:\Trac\repos\trunk\trac\db\util.py"", line 65, in execute return self.cursor.execute(sql_escape_percent(sql), args) File ""c:\Trac\repos\trunk\trac\db\sqlite_backend.py"", line 78, in execute result = PyFormatCursor.execute(self, *args) File ""c:\Trac\repos\trunk\trac\db\sqlite_backend.py"", line 56, in execute args or []) File ""c:\Trac\repos\trunk\trac\db\sqlite_backend.py"", line 48, in _rollback_on_error return function(self, *args, **kwargs) OperationalError: no such column: test_five }}}",defect,closed,normal,0.12.5,ticket system,1.1.1dev,major,fixed,delete comment customfield,,,Fix deletion of ticket changes triggering an error if they contained a change for a custom field which is no longer in use.,,