Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#6596 closed defect (worksforme)

Ticket view error

Reported by: pleshkov@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: ticket system Version: 0.10.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

For example: http://svn.flylinkdc.ru/trac/ticket/293

Trac detected an internal error: Python Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.5/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 313, in process_request
    get_reporter_id(req, 'author'))
  File "/usr/local/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 669, in _insert_ticket_data
    actions = TicketSystem(self.env).get_available_actions(ticket, req.perm)
  File "/usr/local/lib/python2.5/site-packages/trac/ticket/api.py", line 83, in get_available_actions
    return [action for action in actions.get(ticket['status'], ['leave'])
  File "/usr/local/lib/python2.5/site-packages/trac/ticket/model.py", line 104, in __getitem__
    return self.values[name]
KeyError: 'status'

How I can fix this problem?

Attachments (0)

Change History (6)

comment:1 by Emmanuel Blot, 17 years ago

A ticket without a status: it looks like your Trac DB is in trouble.

Can you execute the following command: open a shell window and use the 'sqlite3' tool to dump the ticket information:

cd trac_project_path/db
sqlite3 trac.db
select * from ticket where id=293;
.quit

comment:2 by pleshkov@…, 17 years ago

I use MySQL database for store data:

mysql> select * from ticket where id=293;
+-----+-------------+------------+------------+-------------+----------+----------+-------+---------------------+------+---------+----------
-----------------+--------+------------+---------+------------------------------------------------------------------------------------------
-------+----------+
| id  | type        | time       | changetime | component   | severity | priority | owner | reporter            | cc   | version | milestone
                 | status | resolution | summary | description
       | keywords |
+-----+-------------+------------+------------+-------------+----------+----------+-------+---------------------+------+---------+----------
-----------------+--------+------------+---------+------------------------------------------------------------------------------------------
-------+----------+
| 293 | ??????????? | 1199489654 | 1199489654 | FlyLinkDC++ | NULL     | ???????  | ppa   | panto_975@pochta.ru |      | ?????   | ????????
????? ?????????? | NULL   | NULL       | ??????  | ??? ??????? ?? ?????? ??????????? ?????? ? ?????????? ? ?????? ??????? ???? ?? ??????? ??
?????? |          |
+-----+-------------+------------+------------+-------------+----------+----------+-------+---------------------+------+---------+----------
-----------------+--------+------------+---------+------------------------------------------------------------------------------------------
-------+----------+
1 row in set (0.01 sec)
mysql> select status from ticket where id=293;
+--------+
| status |
+--------+
| NULL   |
+--------+

comment:3 by osimons, 17 years ago

Keywords: needinfo added

Do a select for;

select id, status from ticket where status is NULL or status = '';

Status should never be empty - a ticket always has a state. It starts as 'new' and ends as 'closed', with varying states inbetween.

Do you see a pattern in the invalid tickets? Any hint of what has happed to your Trac that may have caused this? Have you migrated data? Installed plugins? Anything?

To fix the tickets, I suggest you just update your ticket table, and set status to new for all tickets that does not have a resolution, and all tickets to closed that has a resolution. Do selects to make sure the subsets make sense, and: Backup :-)

Please report back with any findings on what may have caused this. If no more information is provided, there realistically is not much more to be done for this issue from a Trac point-of-view.

comment:4 by pleshkov@…, 17 years ago

Resolution: fixed
Status: newclosed

I'm upgrade my trac to Trac 0.11b1 and problem has gone away :) thx.

comment:5 by osimons, 17 years ago

Keywords: needinfo removed
Resolution: fixed
Status: closedreopened

Reopen to change resolution.

comment:6 by osimons, 17 years ago

Resolution: worksforme
Status: reopenedclosed

And closing with new resolution.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström 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.