|Title||Assertion failure in translate_1_to_0|
|Assigned user||Gareth Rees|
|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.
|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.|
|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).