Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5652 closed defect (fixed)

update fails after plugin is installed when using postgres backend

Reported by: george.slavov@… Owned by: coling
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 5 years ago by coling

  • Resolution set to fixed
  • Status changed from new to closed

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

Closes #5652, Refs #4805

comment:2 Changed 5 years ago by coling

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

Refs #5652 and #4805

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.