# config_teamtrack.py -- P4DTI configuration for replication to TeamTrack. # Gareth Rees, Ravenbrook Limited, 2000-10-16. # $Id: //info.ravenbrook.com/project/p4dti/branch/2000-10-30/mahi-alpha/code/replicator/config_teamtrack.py#4 $ # # Copyright 2000 Ravenbrook Limited. This document is provided "as is", # without any express or implied warranty. In no event will the authors # be held liable for any damages arising from the use of this document. # You may make and distribute copies and derivative works of this # document provided that (1) you do not charge a fee for this document or # for its distribution, and (2) you retain as they appear all copyright # and licence notices and document history entries, and (3) you append # descriptions of your modifications to the document history. import dt_teamtrack import logger import replicator import socket rid = 'cmserver' # Replicator identifier. sid = 'cmserver' # Perforce server identifier. log_file = open("p4dti.log", "a") logger = logger.multi_logger([logger.file_logger(log_file), logger.file_logger()]) teamtrack_config = \ { 'logger': logger, 'replicated-fields' : [ ( 'OWNER', 'User', 'user' ), ( 'TITLE', 'Title', 'text' ), ( 'DESCRIPTION', 'Description', 'text' ), ( 'STATE', 'Status', 'state' ), ( 'FIX_DESCRIPTION' , 'Fix-description', 'text' ), ( 'FIXED_IN_DOCPG', 'Fixed-in-doc/ver/pg', 'text' ), ( 'BUILD_INFORMATION', 'Build-information', 'text' ), ( 'FIXED_IN_SW_VERSION', 'Fixed-in-sw-version', 'single-select' ), ( 'FIXED_IN_NMS_VERSION', 'Fixed-in-NMS-version', 'single-select' ), ], 'state-dt-to-p4' : { 'Submitted': 'submitted', 'Need More Initial Info': 'need-more-initial-info', 'Assigned': 'assigned', 'Accepted': 'accepted', 'Fixed': 'closed', 'Release Info Needed': 'release-info-needed', 'Available For Test': 'available-for-test', 'Test': 'test', 'Deferred': 'deferred', 'IRC': 'irc', 'Need More Info': 'need-more-info', 'Feature Request': 'feature-request', 'Verified': 'verified', 'Closed': 'really-closed', }, # A map from Perforce status name to TeamTrack state name. 'state-p4-to-dt' : { 'submitted': 'Submitted', 'need-more-initial-info': 'Need More Initial Info', 'assigned': 'Assigned', 'accepted': 'Accepted', 'closed': 'Fixed', 'release-info-needed': 'Release Info Needed', 'available-for-test': 'Available For Test', 'test': 'Test', 'deferred': 'Deferred', 'irc': 'IRC', 'need-more-info': 'Need More Info', 'feature-request': 'Feature Request', 'verified': 'Verified', 'really-closed': 'Closed', }, } replicator_config = \ { 'logger': logger, 'administrator-address': 'dpalmer@mahinetworks.com', # E-mail address of integration administrator. 'smtp-server': 'smtp.mahinetworks.com', # Address of SMTP server for sending e-mail. 'p4-port': 'cmserver.mahinetworks.com:1666', # Port of Perforce server. 'p4-client-executable': 'c:\\p4gdr.exe', # Path to P4/NTX86/2000.1/17595. } dt = dt_teamtrack.dt_teamtrack(rid, sid, teamtrack_config) r = replicator.replicator(rid, dt, replicator_config)