checkwatches can't handle non-string comment IDs for comment imports and exports

Bug #248938 reported by Graham Binns
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Graham Binns

Bug Description

When doing comment imports and exports for the Bugzilla LP Plugin, the following error occurs (OOPS report attached):

ProgrammingError: operator does not exist: text = integer

This happens because checkwatches calls hasComment(), which checks whether a given comment has already been imported for a given bugwatch. The remote_comment_id field of BugMessage, which is what's used to record a comment as being imported from the remote system, is a TextLine. Unfortunately, the BugzillaLPPlugin ExternalBugTracker uses integer comment IDs (which is what's required by the Bugzilla API). You can't compare an integer and a string in SQL, hence the error.

One of two things needs to change. Either:

 a) Checkwatches should be updated to always cast comment IDs to strings before doing lookups (saving this problem from happening in future)
 or
 b) BugzillaLPPlugin (and all other ExternalBugTracker subclasses) should be required to return strings from getCommentIds() and addRemoteComment().

Revision history for this message
Graham Binns (gmb) wrote :
Changed in malone:
assignee: nobody → gmb
importance: Undecided → High
milestone: none → 1.99
status: New → Triaged
Graham Binns (gmb)
Changed in malone:
status: Triaged → In Progress
Revision history for this message
Graham Binns (gmb) wrote :

Landed in r6714.

Changed in malone:
status: In Progress → Fix Committed
Graham Binns (gmb)
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.