Received: from martin.ravenbrook.com (martin.ravenbrook.com [193.112.141.241]) by raven.ravenbrook.com (8.9.3/8.9.3) with ESMTP id PAA18966 for ; Mon, 20 Nov 2000 15:36:08 GMT Received: from [193.112.141.254] (grouse.ravenbrook.com [193.112.141.254]) by martin.ravenbrook.com (8.8.8/8.8.7) with ESMTP id PAA02575 for ; Mon, 20 Nov 2000 15:30:36 GMT (envelope-from gdr@ravenbrook.com) Mime-Version: 1.0 X-Sender: gdr@pop3 Message-Id: Date: Mon, 20 Nov 2000 15:35:41 +0000 To: p4dti-staff@ravenbrook.com From: Gareth Rees Subject: Automatic configuration design Content-Type: text/plain; charset="us-ascii" ; format="flowed" Issue: do we generate a configuration which the user must install (by running p4 jobspec and so on) or does the replicator do all the work itself? An automatic configuration generator is specific to two defect trackers (in this case, TeamTrack and Perforce). The administrator supplies a basic configuration (replicator id, user ids, hostnames, e-mail addresses and so on) and a list of TeamTrack field names. The replicator builds a detailed configuration, consisting of: 1. A list of field mappings (TeamTrack field, Perforce field, how to convert). 2. A Perforce jobspec. The TeamTrack field "ISSUEID" corresponds to the Perforce "Jobname" field, but these are replicated specially and shouldn't appear in this list. We always replicate the following fields: TeamTrack Perforce definition Mapping ------------------------------------------------------- STATE 102 State select 32 required State OWNER 103 Owner word 32 required User TITLE 105 Title line 80 required Line Other fields we set up as follows. 1. The Perforce field number is the next in sequence, starting at 106. 2. The Perforce field name is the TeamTrack field name but with an initial capital only, and underscores turned into hyphens. 3. We map the field type and length as follows: TeamTrack type P4 type P4 length Mapping --------------------------------------------------------------- NUMERIC word 32 Numeric TEXT line as TeamTrack Line MEMO text 0 Text DATETIME date 20 Datetime SELECTION select 32 Single-select BINARY word 3 Binary STATE select 32 State USER word 32 User PROJECT word 32 Single-select SUMMATION ? ? ? MULTIPLE_SELECTION ? ? ? CONTACT word 32 Single-select COMPANY word 32 Single-select INCIDENT word 32 Single-select PRODUCT word 32 Single-select SERVICEAGREEMENT ? ? ? FOLDER word 32 Single-select KEYWORDLIST ? ? ? PRODUCTLIST ? ? ? PROBLEM word 32 Single-select RESOLUTION word 32 Single-select MERCHANDISE word 32 Single-select Entries with ? are field types that I'm not sure how to map (except for SUMMATION they are all multiple selection fields). It would be straightforward to map the data using some scheme like making the corresponding field a text field in Perforce and putting one entry per line, but Perforce doesn't provide a multiple-selection interface. Some thought required here (we could replicate by listing *all* the selection options one per line in a text field and ticking the selected ones?) For single-select fields we build the Values-field entry in the Perforce jobspec by getting all the selections from the SELECTIONS table and converting them to Perforce words by converting spaces to underscores and so on. See the description of the FIELDS table in the TeamTrack schema documentation for details about these field types. Notes 1. All select fields have length 32, since the "NAME" field in the SELECTIONS table has type varchar(32).