P4DTI issue job000364

TitleBugzilla bugs with empty descriptions can't be replicated
Statusclosed
Priorityessential
Assigned userNick Barnes
OrganizationRavenbrook
DescriptionIf one creates a Bugzilla bug with an empty Description field, the replicator replicates it to Perforce correctly but then is unable to replicate it back to Bugzilla.
The following error message is produced:

2001-07-19 15:07:26 UTC (P4DTI-808X) Job 'job000025' could not be replicated to issue '11': Bugzilla module error: (P4DTI-5059) Can only append to Bugzilla field 'longdesc'
AnalysisPerforce preserves leading and trailing whitespace on lines in text fields, but doesn't preserve lines which only contain whitespace. It replaces such a line with an empty line.
An empty description record in Bugzilla is actually stored as a single space, which Perforce then fails to preserve, so when the replicator then tries to replicate it back to Bugzilla it thinks the body of the text has changed.
If we always strip longdesc records on their way into and out of the Bugzilla database, the replicator won't be able to tell the difference between a single space and an empty record, so won't complain.
However, this won't fix the problem with longdescs containing whitespace-only lines between other lines. That's now job000375.
GDR 2001-08-07: The Perforce part of this is Perforce job 6149.
How foundcustomer
EvidenceA Perforce user contacted Perforce support with this problem. <http://info.ravenbrook.com/mail/2001/07/18/23-15-02/0.txt>
Observed in1.1.1
Introduced in1.0.0
Created byNick Barnes
Created on2001-07-19 16:53:26
Last modified byNick Barnes
Last modified on2002-04-09 11:37:52
History2001-07-19 NB Created.
Support

Advice for all releases.

Workaround: If a user has such a bug in their Bugzilla database, they can enable its replication by using MySQL to put some text into the guilty longdescs row. (e.g. update longdescs set thetext='No description.' where bug_id = 371;). This is not very satisfactory.

Fixes

Change Effect Date User Description
14331 closed 2001-07-19 17:04:08 Nick Barnes Always strip longdesc records on the way in or out of the database.