Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#5652 closed defect (fixed)

update fails after plugin is installed when using postgres backend

Reported by: george.slavov@… Owned by: Colin Guthrie
Priority: normal Component: ClientsPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description

There is a problem in the code in api.py that prevents a successful update.

Postgres does not accept double quoted values as literals hence the section 'v5' needs to be updated using escaped single quotes.

Below is the corrected code (I have not tested this with anything other than postgres but it should work fine):

cursor.execute('INSERT INTO client_events '

'SELECT \'Weekly Summary\', \'Milestone Summary\', \'Send Email\', MAX(summary_lastupdate) ' 'FROM client')

cursor.execute('INSERT INTO client_event_action_options '

'SELECT \'Weekly Summary\', name, \'Email Addresses\', summary_list ' 'FROM client ' 'WHERE summary_list!=\'\)

cursor.execute('INSERT INTO client_events '

'SELECT \'Ticket Changes\', \'Ticket Change Summary\', \'Send Email\', MAX(changes_lastupdate) ' 'FROM client')

cursor.execute('INSERT INTO client_event_action_options '

'SELECT \'Ticket Changes\', name, \'Email Addresses\', changes_list ' 'FROM client ' 'WHERE changes_list!=\'\)

Attachments (0)

Change History (2)

comment:1 Changed 15 years ago by Colin Guthrie

Resolution: fixed
Status: newclosed

(In [6473]) Hopefully fix some postgres issues.

Closes #5652, Refs #4805

comment:2 Changed 15 years ago by Colin Guthrie

(In [6474]) Partially revert r6473 (the reports.py part was not intended here).

Refs #5652 and #4805

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Colin Guthrie.
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.