checkwatches can't handle non-string comment IDs for comment imports and exports
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().
Changed in malone: | |
status: | Triaged → In Progress |
Changed in malone: | |
status: | Fix Committed → Fix Released |
Landed in r6714.