P4DTI issue job000503

Titlereplicate_p for TeamTrack is too hard.
Statussuspended
Priorityoptional
Assigned userNick Barnes
OrganizationRavenbrook
DescriptionThe replicate_p configuration parameter is hard to write for TeamTrack, because the example in the AG is not ideal and because project IDs are not readily available to TeamTrack administrators. The P4DTI TeamTrack integration is now maintained and supported by TeamShare <http://www.teamshare.com/>.
The AG says, Example for TeamTrack that restricts replication to issues belong to the project whose ID is 6:

   def replicate_p(self):
     return self['PROJECTID'] == 6

The problems here are two-fold. First, it isn't clear from the doc how to get the TeamTrack project ID. Second, only the syntax for a single project is shown.
Analysis (from [1])
 Here is a simple script that will decipher what the TeamTrack project ID numbers are. You can't identify this directly from TeamTrack as the TeamTrack GUI only refers to project by name.

   import teamtrack

   def printinfo(user,password,hostname):
           password = '<provide your password here>'
           server = teamtrack.connect(user,password,hostname)
           for record in server.query(teamtrack.table['PROJECTS'], ''):
                           print record ['ID'],record ['NAME']

   if __name__ == '__main__':
           ttuser = raw_input("enter a TeamTrack user name: ")
           upass = raw_input("enter the TeamTrack user password: ")
           tthost = raw_input("enter the TeamTrack host name: ")
           printinfo(ttuser,upass,tthost)

Once you have identified the relevant project numbers that you want to replicate, you can edit the "config.py" file appropriately, eg:

   def replicate_p(self):
          return self['PROJECTID'] in [4,5]

[GDR 2002-06-24] We intend users to use the teamtrack_query.py script to query the TeamTrack database (unless they prefer to use a database tool like Microsoft SQL Server). See [2]. Probably this isn't adequately referenced from the Administrator's Guide.
How foundcustomer
Evidence[1] <http://info.ravenbrook.com/mail/2002/04/11/20-09-00/0.txt>
[2] <http://www.ravenbrook.com/project/p4dti/version/1.4/manual/aag/#section-6>
Observed in1.2.1
Introduced in1.0.0
Created byNick Barnes
Created on2002-04-12 15:20:50
Last modified byDavid Jones
Last modified on2003-08-19 13:55:19
History2002-04-12 NB Created.
2002-06-24 GDR Referred to solution in the AAG.
2003-05-19 NB TeamShare handover.
2003-08-19 DRJ Suspended due to teamshare handover

Fixes

Change Effect Date User Description
35521 suspended 2002-11-14 13:44:46 Richard Brooksby Removing TeamTrack support from master sources.
Updating project index and FAQ to reflect new TeamTrack situation.