Modify

Opened 10 years ago

Closed 8 years ago

#12099 closed defect (fixed)

Not compatible with Trac 1.1.2

Reported by: vaclav.cejka@… 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)

api.py (7.3 KB) - added by vaclav.cejka@… 10 years ago.
Updated source file
manager.py (13.5 KB) - added by vaclav.cejka@… 10 years ago.
Updated source file of manager.py
timeline.py (4.2 KB) - added by vaclav.cejka@… 10 years ago.
Updated source file of timeline.py

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by anonymous

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 with get_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 with with self.env.db_transaction as db: statement, intended appropriate lines and removed db.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.

Changed 10 years ago by vaclav.cejka@…

Attachment: api.py added

Updated source file

Changed 10 years ago by vaclav.cejka@…

Attachment: manager.py added

Updated source file of manager.py

Changed 10 years ago by vaclav.cejka@…

Attachment: timeline.py added

Updated source file of timeline.py

comment:2 Changed 10 years ago by Ryan J Ollos

Owner: changed from Colin Guthrie to Ryan J Ollos
Status: newaccepted

comment:3 Changed 10 years ago by Ryan J Ollos

For future reference, please consider providing a patch as opposed to edited files: trac:TracDev/SubmittingPatches.

comment:4 Changed 10 years ago by Ryan J Ollos

In 14737:

1.0dev: PEP-0008 changes. Refs #12099.

Removed pretty_timedelta compatibility function.

comment:5 Changed 8 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 15985:

1.0.0dev: Support Trac 1.0+, including Trac 1.2

The changes have been minimally tested, and only with SQLite.
Please report any issues to #12099.

Fixes #12099.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.