Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#5597 closed defect (wontfix)

can't view tickets

Reported by: didley@… Owned by: Christian Boos
Priority: normal Milestone:
Component: ticket system Version: 0.10.4
Severity: major Keywords:
Cc: Eli Carter Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Emmanuel Blot)

After a downgrade from 0.11.dev to trac 10.4 I can't view tickets. The result is the error message

Python Traceback

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

Need urgent help

regards

Attachments (0)

Change History (15)

comment:1 by Emmanuel Blot, 17 years ago

Description: modified (diff)
Severity: blockermajor

Although I can understand the frustration, you cannot install the development release of a software and consider having difficulties to revert back to the official release is a blocker issue.

comment:2 by Christian Boos, 17 years ago

For some reason, you now have tickets with no status. Try the following using the sqlite3 command line tool (assuming you're using PySqlite):

update ticket set status='new' where status='' or status is null;

(untested, so backup your db first!)

comment:3 by didley@…, 17 years ago

Sorry for my blocker issue.

I will try the reference.

comment:4 by didley@…, 17 years ago

Yes I use PySqlite.

I did try your recommendation. But there is no effect. It's the same error message.

comment:5 by didley@…, 17 years ago

further more:

I asked the database for "

select status, id from ticket;

" There is no field of column status which is empty.

comment:6 by anonymous, 17 years ago

Owner: changed from Jonas Borgström to Christian Boos

comment:7 by didley@…, 17 years ago

For your information:

In the version 10.4 I changed in file …\ticket\model.py the line 104 from

return self.values[name]  in  return self.values.get(name)

Now it works.

comment:8 by Eli Carter, 17 years ago

Clarification please:

Was this environment created with 0.11dev and then downgraded to 0.10.4

or

Was this environment created with 0.10.*, upgraded to 0.11dev, and then downgraded to 0.10.4

(Just FYI: In 0.11dev, the status implementation changed dramatically, and it no longer uses the entries in the enum table.)

comment:9 by Eli Carter, 17 years ago

Cc: Eli Carter added

in reply to:  8 comment:10 by didley@…, 17 years ago

Replying to ecarter:

Clarification please:

Was this environment created with 0.11dev and then downgraded to 0.10.4

or

Was this environment created with 0.10.*, upgraded to 0.11dev, and then downgraded to 0.10.4

(Just FYI: In 0.11dev, the status implementation changed dramatically, and it no longer uses the entries in the enum table.)

I created with 0.11dev and then downgraded to 0.10.4 .

The only reason to downgrade from 0.11dev to 0.10.4 was to use more plugins. Now I give up because there another small things they will not work. Im using 0.11dev again and I'm looking forward for the first 0.11 release.

All in all you all do a great job.

in reply to:  8 comment:11 by Eli Carter, 17 years ago

Replying to ecarter:

(Just FYI: In 0.11dev, the status implementation changed dramatically, and it no longer uses the entries in the enum table.)

Furthermore, 0.11dev does not populate the status values in the enum table, so downgrading from something created by 0.11dev to 0.10.4 will require creating those entries.

comment:12 by Eli Carter, 17 years ago

Resolution: wontfix
Status: newclosed

Downgrading an environment has not been supported in the past, and so I don't think this is something care enough about to implement.

comment:13 by anonymous, 17 years ago

I can understand not wanting to support downgrading but the 0.11 install documentation needs to be updated to reflect that.

No database change is required (for now), so it's currently safe to switch an existing 0.10 environment to 0.11 and back.

http://trac.edgewall.org/wiki/Trac0.11/TracInstall

in reply to:  13 comment:14 by Eli Carter, 17 years ago

Replying to anonymous:

I can understand not wanting to support downgrading but the 0.11 install documentation needs to be updated to reflect that.

Ah, good point. Fixed.

Thanks!

comment:15 by anonymous, 16 years ago

I had this exact issue and was able to fix it with the following steps:

  • enter sqlite3 shell from a terminal
      $ sqlite3
    
  • check if the enum table exists (mine did, just no 'status' entries).
      sqlite> SELECT * FROM enum;
    
    • if the table does exist, insert the status entries.
        sqlite> INSERT INTO "enum" VALUES('status','new','1');
        sqlite> INSERT INTO "enum" VALUES('status','assigned','2');
        sqlite> INSERT INTO "enum" VALUES('status','reopened','3');
        sqlite> INSERT INTO "enum" VALUES('status','closed','4');
      
    • if the table does not exist, dump it from a host that has a good enum table (old install, etc), then copy the dump text and paste into the sqlite3 shell.
  • Ctrl-d to exit the sqlite3 shell
  • Test

Modify Ticket

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