P4DTI issue job000426

TitleMigration to TeamTrack fails unless issue ids are zero-filled to 5 digits
Statusclosed
Priorityessential
Assigned userGareth Rees
OrganizationRavenbrook
DescriptionIf you change the number of digits to which issue ids are zero-filled, migration and replication of new issues doesn't work.
AnalysisThis is because the TSServer::Submit method doesn't return the ID of the new issue, but rather the ISSUEID, as a number. To find the ID of that issue we need to search the CASES table for a record with the given ISSUEID. But ISSUEIDs in the database are strings, zero-filled to some number of digits. Since 5 is the default number of digits to fill to, the P4DTI looks for that -- but it may end up looking for ISSUEID='00123' when it should be looking for ISSUEID='000123' or whatever.
Possible solutions:
1. Read the number of zero-fill digits for the project to which we submitted the issue. It's the ZEROFILLTO field in the PROJECTS table.
2. Get the newly-created issue in a different way; perhaps by TS_ID=(SELECT MAX(TS_ID) FROM TS_CASES WHERE TS_ISSUEID LIKE '%123'); this might work because new issues get added to the end of the table. Unfortunately there is a race condition: if BUG01123 and ENH00123 get submitted in the same poll period then we might pick the wrong one.
3. Ask TeamShare to improve the API so that new issues can be reliably identified.
How foundinspection
Evidence<http://www.ravenbrook.com/project/p4dt...c/2001-03-23/release-1.0.5-test-report/>, item 9
Observed in1.3.3
Introduced in1.3.0
Test procedure<http://www.ravenbrook.com/project/p4dti/master/test/test_p4dti.py>, section 17
Created byGareth Rees
Created on2001-12-03 19:40:23
Last modified byGareth Rees
Last modified on2002-01-10 16:04:28
History2001-12-03 GDR Created.

Fixes

Change Effect Date User Description
25786 closed 2002-01-10 17:11:25 Gareth Rees Fixed TeamTrack integration so that migration of issues to TeamTrack works regardless of how issueids are represented. Added test case.
The TeamTrack 4.5 integration doesn't support migration or creation of new issues in Perforce.