Modify ↓
Opened 10 years ago
Closed 8 years ago
#12099 closed defect (fixed)
Not compatible with Trac 1.1.2
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | WorkLogPlugin |
Severity: | normal | Keywords: | |
Cc: | Ryan J Ollos | Trac Release: | 1.2 |
Description
Because get_db_cnx is no longer supported on Trac 1.1.2 (see http://trac.edgewall.org/wiki/TracDev/DatabaseApi), plugin does not work on 1.1.2. It fails environment upgrade, so nothing works then.
Attachments (3)
Change History (8)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Owner: | changed from Colin Guthrie to Ryan J Ollos |
---|---|
Status: | new → accepted |
comment:3 Changed 10 years ago by
For future reference, please consider providing a patch as opposed to edited files: trac:TracDev/SubmittingPatches.
Note: See
TracTickets for help on using
tickets.
I'm not Python programmer, but I tried to fix it for my own. Files with outdated call are api.py, manager.py and timeline.py. In most cases only SELECT SQL statements are used, in this case I exchanged old
get_db_cnx
call withget_read_db
call. This fixes for example upgrade of the environment.In start_work and stop_work of manager.py, INSERT statement is used. In this case I exchanged old
get_db_cnx
withwith self.env.db_transaction as db:
statement, intended appropriate lines and removeddb.commit
call. Files are attached.Such a way, it seems the plugin works again. But I do not know much about Python and Trac structure, so please check it.