Title | Assertion failure in translate_1_to_0 |
Status | closed |
Priority | critical |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | If an optional field in Perforce has no value, then a field translator may fail with an assertion error. |
Analysis | This is because replicator.translate_issue_p4_to_dt substitutes None for the Perforce value when it the field doesn't appear in the job. But the translate_0_to_1 functions don't take proper account of this. One solution is to change the translate_0_to_1 functions so that they work with None. The other solution is to use the empty string '' rather than None as the default value (in replicator.translate_issue_p4_to_dt). The latter is sensible since all Perforce field values are strings, and a missing field does indeed correspond to an empty string in an 'optional' field. |
How found | customer |
Evidence | <http://info.ravenbrook.com/mail/2001/01/18/15-55-40/0.txt >< http://info.ravenbrook.com/mail/2001/01/18/16-28-25/0.txt > |
Observed in | 0.4.2 |
Introduced in | 0.4.0 |
Test procedure | <http://www.ravenbrook.com/project/p4dti/master/test/test_p4dti.py > |
Created by | Gareth Rees |
Created on | 2001-01-18 16:31:19 |
Last modified by | Gareth Rees |
Last modified on | 2001-12-10 19:19:45 |
History | 2001-01-18 GDR Created. |
Change | Effect | Date | User | Description |
---|---|---|---|---|
7372 | closed | 2001-01-19 15:39:48 | Gareth Rees | Merged fix for job000181 into version/0.5/. |
7371 | closed | 2001-01-19 15:38:19 | Gareth Rees | Merged fix for job000181 into master sources. |
7370 | closed | 2001-01-19 15:32:15 | Gareth Rees | Fixing job000181: Replicator uses empty string as default value when a Perforce field is missing. When the replicator checks to see if the defect tracker has made changes to the issue it must consider 'field is empty' and 'field missing in Perforce' as being equivalent. Translators in dt_teamtrack.py map the empty string to something appropriate (or raise an error saying they can't translate it). |