home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April / Chip_1997-04_cd.bin / prezent / cb / data.z / BTSCONST.PAS < prev    next >
Pascal/Delphi Source File  |  1997-01-16  |  13KB  |  350 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Borland Bug Tracking System                     }
  5. {       Constants                                       }
  6. {                                                       }
  7. {       Copyright (C) 1993,96 Borland International     }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. unit BtsConst;
  12.  
  13. interface
  14.  
  15. const
  16.  
  17. { Version }
  18.  
  19.   BtsVersion      = '3.0';
  20.  
  21. { File Names }
  22.  
  23.   fnConfig        = 'BTS.INI';
  24.   fnBtsBmp        = 'BTS.BMP';
  25.   fnStatLook      = 'STATLOOK.INI';
  26.   fnUserList      = 'USERLIST.INI';
  27.   fnBtsDown       = 'BTSDOWN.TXT';
  28.   fnBugData       = 'BUGDATA.DB';
  29.   fnAdminLib      = 'BTSADMIN.DLL';
  30.  
  31. { Table & Lookup Section Names }
  32.  
  33.   tnBugData       = 'BUGDATA';
  34.   tnAudit         = 'AUDIT';
  35.   tnStatus        = 'STATUS';
  36.   tnCategory      = 'CATEGORY';
  37.   tnPriority      = 'PRIORITY';
  38.   tnUser          = 'USER';
  39.   tnProduct       = 'PRODUCT';
  40.   tnOutline       = 'OUTLINE';
  41.   tnPrgrmrs       = 'PRGRMRS';
  42.   tnGroup         = 'GROUP';
  43.   tnFieldMap      = 'FIELDMAP';
  44.   tnEspBugs       = 'ESPBUGS';
  45.   tnDeleted       = 'DLTDBUGS';
  46.   tnHowFound      = 'HOWFOUND';
  47.   tnResolve       = 'RESOLVE';
  48.   tnVerify        = 'VERIFY';
  49.   tnCouncil       = 'COUNCIL';
  50.   tnBugList       = 'BUGLIST';
  51.   tnDBList        = 'DBLIST';
  52.   tnBugDatBase    = 'BUGDAT%2.2d';
  53.   tnAuditBase     = 'AUDIT%2.2d';
  54.   tnDescKeys      = 'DESCKEYS.DB';
  55.   pnTables        = 'TABLES\';
  56.  
  57. { Config & Lookup Sections }
  58.  
  59.   csConfig        = 'Config';
  60.   csBldSect       = 'Build Number';
  61.   csVerSect       = 'Version';
  62.   csFoundBy       = 'Found By';
  63.   csSubBy         = 'Submitted By';
  64.   csProgrammer    = 'Programmer';
  65.   csResStatMap    = 'Res_Status_Map';
  66.   csVerStatMap    = 'Ver_Status_Map';
  67.   csDefaults      = 'Defaults';
  68.   csCurrUsers     = 'Current Users';
  69.   csUserHist      = 'User History';
  70.   csDBNames       = 'Databases';
  71.   csPrinting      = 'Printing';
  72.   csStatLookMap   = 'StatLookMappings';
  73.  
  74. { Config Keys }
  75.  
  76.   ckVerLabel      = 'VersionLabel';
  77.   ckFontName      = 'FontName';
  78.   ckFontSize      = 'FontSize';
  79.   ckFontStyle     = 'FontStyle';
  80.   ckFormTop       = 'FormTop';
  81.   ckFormLeft      = 'FormLeft';
  82.   ckConfirm       = 'Confirmation';
  83.   ckAutoSave      = 'AutoSave';
  84.   ckNoQueryType   = 'NoQueryTypeAssist';
  85.   ckSuperAdmin    = 'SuperAdmin';
  86.   ckBugHunt       = 'Bughunt';
  87.   ckAuxTab        = 'AuxTab';
  88.   ckAuxTabDesc    = 'AuxTabDesc';
  89.   ckCount         = 'Count';
  90.   ckPrivDir       = 'PrivDir';
  91.   ckBtsDir        = 'BtsDir';
  92.   ckBtsName       = 'BtsName';
  93.   ckUserName      = 'UserName';
  94.   ckNetControlDir = 'NetControlDir';
  95.   ckNewBugNumber  = 'NewBugNumber';
  96.   ckDefaultRights = 'DefaultRights';
  97.   ckAttachDir     = 'AttachDir';
  98.   ckAdmin         = 'Admin';
  99.   ckIndOpen       = 'indOpen';
  100.   ckIndInEntry    = 'indInEntry';
  101.   ckIndNeedsRev   = 'indReview';
  102.   ckIndFromEsp    = 'indFromEsp';
  103.   ckIndRejected   = 'indRejected';
  104.   ckIndResolved   = 'indResolved';
  105.   ckIndFixed      = 'indFixed';
  106.   ckTablePW       = 'FormPos';
  107.   ckLocalTestDir  = 'LocalTestDir';
  108.   ckRequireLeaf   = 'RequireLeafNode';
  109.   ckDisplayOtl    = 'DisplayOutline';
  110.   ckAssignTester  = 'AssignTester';
  111.   ckDefQA         = 'DefaultQA';
  112.   ckDefRD         = 'DefaultR&D';
  113.   ckFieldSize     = 'Fieldsize';
  114.   ckUsePlusBuild  = 'UsePlusBuild';
  115.  
  116. { Dialog Strings (mostly) }
  117.  
  118.   SInitIdapi      = 'Initializing BDE';
  119.   SOpenTables     = 'Opening Tables';
  120.   SLoadingForm    = 'Loading forms';
  121.   SDeletingBug    = 'Deleting Bug';
  122.   SAllBugs        = 'All Bugs';
  123.   SNoFileName     = 'No Filename specified';
  124.   SNewBugInit     = 'Initializing new bug';
  125.   SNetName        = 'NetName';
  126.   SResIn          = 'Resolved in ';
  127.   SResolution     = 'Resolution';
  128.   SBugSave        = 'Saving bug';
  129.   SUpdating       = 'Updating...';
  130.   SLocked         = 'Locked';
  131.   SSelectPri      = 'Select Priority';
  132.   SSelectCat      = 'Select Category';
  133.   SSelectArea     = 'Select Area';
  134.   SSelectRes      = 'Select Resolution';
  135.   SSelectProd     = 'Select Product';
  136.   SViewAtPri      = 'View bugs at or above priority';
  137.   SViewAtCat      = 'View bugs at or above category';
  138.   SViewArea       = 'View bugs in program area';
  139.   SViewRes        = 'View bugs with Resolution';
  140.   SViewProd       = 'View bugs of Product type';
  141.   SResComCap      = ' Comments';
  142.   SPrinting       = 'Printing';
  143.   SDelNewQuery    = 'Delete unfinished bug?';
  144.   SDeleteQuery    = 'Delete this bug?';
  145.   SCancelQuery    = 'Cancel Changes?';
  146.   SRebuildQuery   = 'Rebuild word index?';
  147.   SSaveQuery      = 'Record has been changed.  Save changes?';
  148.   SFinishBug      = 'Finish this new bug before starting another.';
  149.   SGotoBug        = 'Goto Bug';
  150.   SBugNumLbl      = 'Bug Number:';
  151.   SGotoRec        = 'Goto Record';
  152.   SRecNoLbl       = 'Record Number:';
  153.   SLocateValue    = 'Locate Value';
  154.   SLocateField    = '"%s" Value:';
  155.   SLocateNoMatch  = '"%s" not found';
  156.   SRecNotFound    = 'Record not found';
  157.   SResPage        = '&Resolve';
  158.   SESPPage        = 'E&SP';
  159.   SFromESPCap     = 'Bugs from ESP';
  160.   SNoResInfo      = 'No resolution info.';
  161.   SBlankQuery     = 'Query is blank';
  162.   SShellExecErr   = 'ShellExec Error: ';
  163.   SFileNotFound   = 'File not found: ';
  164.   SNoAssocApp     = 'No application associated with this file extension';
  165.   SBuildIndex     = 'Building word index';
  166.   SQuery          = 'Query';
  167.   SMessage        = 'Message';
  168.   SQuerySect      = 'Queries';
  169.   SUntitledQuery  = 'Untitled Query';
  170.   SQueryName      = 'Query Name:';
  171.   SQNameQueryCap  = 'Enter Query Name';
  172.   SEnterFileName  = 'Enter FileName';
  173.   SUpdateTabPath  = 'Path to table with list of bug numbers:';
  174.   SEditComment    = 'Edit Comment';
  175.   SViewComment    = 'View Comment';
  176.   SNoQueryName    = 'Query must have a name';
  177.   SRunningQuery   = 'Running Query';
  178.   SNoQryAutoSave  = 'NoQueryAutoSave';
  179.   SEspSetup       = 'Setting up ESP Review form';
  180.   SSystemDownCap  = 'System Down Message';
  181.   SSelectDBCap    = 'Select a Database';
  182.   SDestDBPrompt   = 'Destination Database:';
  183.   SXferMessage    = 'Transfering Record(s)';
  184.   SInvFldName     = 'Invalid field name';
  185.   SNoQryLocate    = 'Locate not supported on a query result';
  186.   SNoNewValue     = 'New value not specified';
  187.   SChgAllConfirm  = 'Blank old value will change all records, is this OK?';
  188.   SSystemDisabled = 'System is now disabled'#13#10'Delete BTSDOWN.TXT to re-enable';
  189.   SFileHandlesLow = 'Ran out of file handles creating this form, '+
  190.                     'Add "File Handles  = 100" to NET.CFG to avoid problems';
  191.   SXferAgainErr   = 'Use ''Transfer Current'' first to select a target Database';
  192.   SGuestMsg       = 'As a guest of this BTS system, you can view bug'+
  193.                     'reports but you cannot modify or enter bug reports.';
  194.   SCurrBugInvalid = 'Current record is no longer valid.'#13#10+
  195.                     'Now viewing all bugs';
  196.   STransferMsg    = 'This command will transfer all the records in the current '+
  197.                     'working set to another database.  Do you want to do this?';
  198.   SBatUpateMsg    = 'Proceed with batch update?';
  199.  
  200. { Misc. String Constants }
  201.  
  202. const
  203.   CR              = #13;
  204.   LF              = #10;
  205.   ESC             = #27;
  206.   CRLF            = CR+LF;
  207.   MinAudRecNo     = Low(Smallint) + 1;
  208.   MaxAudRecNo     = High(Smallint);
  209.   SDash           = ' - ';
  210.   SSpace          = ' ';
  211.   SUnderbar       = '_';
  212.   SDots           = '..';
  213.   SEmptyStr       = '';
  214.   exBugNo         = '_BN';
  215.   exCurRes        = '_CR';
  216.   exCurVer        = '_CV';
  217.   SNone           = 'None';
  218.   STrue           = 'TRUE';
  219.   SYes            = 'YES';
  220.   SOldValue       = 'Old Value:'#13#10;
  221.   SNewValue       = #13#10'New Value:'#13#10;
  222.   SSeeComment     = 'See Comment';
  223.   SSeeField       = 'See Field';
  224.   SConfigFile     = 'ConfigFile';
  225.   SIndex          = 'Index';
  226.   SSubjectID      = 'SubjectID';
  227.   SSubject        = 'Subject';
  228.   SRoot           = 'Root';
  229.   SBatPath        = 'BatPath';
  230.   SBlank          = 'BLANK';
  231.   SNotBlank       = 'NOT BLANK';
  232.   SGroup          = 'Group';
  233.   SNotResolved    = 'Not Resolved';
  234.   SReserveHandles = 'ReserveFileHandles';
  235.   SRequireNetID   = 'RequireNetID';
  236.   SLogin          = 'Login: %s %s';
  237.   SLogout         = '%s Logout: %s %s';
  238.   SMaxWinVer      = 'MaxWinVer';
  239.   SLocalTestDir   = 'Local Test Directory';
  240.   SCopyAttach     = 'Copy Attachment';
  241.   SFileName       = 'File Name';
  242.   SCurrentUsers   = 'Current Users';
  243.   SDBLongDesc     = '&%d) Database Description';
  244.   SDBShortDesc    = 'DBDESC%d';
  245.   SPlaceHolder    = 'Place Holder';
  246.  
  247. { Range Strings }
  248.  
  249.   SBugs           = '%s bugs';
  250.   SOpen           = 'Open';
  251.   SPriGTCap       = ', Priority >= ';
  252.   SCatGTCap       = ', Category >= ';
  253.   SOpenPriCap     = 'Open'+SPriGTCap+' %s';
  254.   SOpenCatCap     = 'Open'+SCatGTCap+' %s';
  255.   SOpenAsgnArea   = 'Assigned Bugs in Area - %s';
  256.   SOpenArea       = 'Open Bugs in Area - %s';
  257.   SByAreaCap      = 'All Bugs in Area - %s';
  258.   SResByArea      = 'Resolved Bugs in Area - %s';
  259.   SAsgnCap        = 'Open, Assigned to %s';
  260.   SSubBy          = 'All bugs submitted by %s';
  261.   SOpenProdCap    = 'Open, Product = %s';
  262.   SResWithRes     = 'Resolved Bugs with Resolution = %s';
  263.   SResSubByCap    = 'Resolved bugs submitted by %s';
  264.   SReOpened       = 'Re-Opened Bugs assigned to %s';
  265.  
  266. { Error Strings }
  267.  
  268.   SCopyError      = 'Error copying file (%d)';
  269.   SUnknownUser    = 'Cannot determine network name';
  270.   SBadSysCfgFile  = 'Bad or missing system config file: ';
  271.   SRecNotLocked   = 'Record not locked';
  272.   SInvalidBugSave = 'Saved bug information is invalid, updates not written';
  273.   SResComSave     = 'Invalid resolution link';
  274.   SAuditWriteErr  = 'Error updating audit trail, changes not saved';
  275.   SStatLookErr    = 'Error reading static lookup section: [%s]';
  276.   SNoStatMapping  = 'Could not determine new status from resolution';
  277.   SNoRecords      = 'No matching records';
  278.   SVerNotBlank    = 'Cannot blank resolution, verification already entered';
  279.   SNoResolution   = 'Bug has not been Resolved';
  280.   SCantGetBugNo   = 'Error getting next bug number';
  281.   SBadOutline     = 'Could not read outline table';
  282.   SInitNewBug     = 'Could not initialize new bug';
  283.   SMissingConfig  = 'Cannot find config file: ';
  284.   SSystemDown     = 'System is down for maintenance';
  285.   SPasteError     = 'Bug Paste only allowed on a new bug';
  286.   SNoDeletedTab   = 'Deleted bug table is missing';
  287.   SNotNeedReview  = 'Bug is not set to "Needs Review"';
  288.   SInvalidField   = 'Invalid %s value: %s';
  289.   SCantFindTables = 'Cannot find BTS Tables in ';
  290.   SInvalidBtsDir  = 'Invalid BTS Directory: ';
  291.   SCantBeBlank    = '%s cannot be blank';
  292.   SMissingAttach  = 'Missing Attachment: %s';
  293.   SRights1        = 'Insufficient Rights:'#10#13'You do not have the "';
  294.   SRights2        = '" rights that are required to perform this operation';
  295.   SConfigInit     = 'Config file not initialized';
  296.   SMustAddComment = 'Must add a comment before rejecting bug';
  297.   SNoEspBugRec    = 'No linked record in ESPBUGS';
  298.   SNeedEspReview  = 'Bug must first be processed through ESP Review';
  299.   SHandleErr      = 'Insufficient file handles to run safely.'#13#10+
  300.                     'Required: %d, Available %d'#13#10+
  301.                     'Add FILE HANDLES = 100 to your NET.CFG file';
  302.   SClipFormat     = 'PasteBug called with wrong clipboard format';
  303.   SOpSysVer       = 'Unsupported Operating System Version: %f';
  304.   SInvChgList     = 'Invalid Changelist state';
  305.   SStatUpdErr     = 'Error updating [%s] section of STATLOOK.INI from %s table.'#13#10'Message: %s';
  306.   SAlreadyExists  = '%s already exists';
  307.   SInvalidDBDesc  = 'Invalid DB Description: %s';
  308.   SXferKeyViol    = 'Bug# %d already exists in destination database';
  309.   SXferAborted    = 'Batch transfer aborted';
  310.   SUpdateFailed   = 'One or more records could not be updated';
  311.   SLeafNodeReq    = 'Must select leaf node from outline';
  312.   SNotSupported   = 'Not Supported';
  313.   SLoadError      = 'Error loading %s [%d]';
  314.   SBatchRange     = 'Cannot update a range based working set';
  315.  
  316. { Query Stuff }
  317.  
  318. type
  319.   TQueryDataType = (qdBugData, qdResolution, qdVerification, qdAudit, qdLookup);
  320.   TQueryFlags = set of TQueryDataType;
  321.  
  322. { User Rights }
  323.  
  324. type
  325.   TUserRightsElement = (
  326.       urEntry,            {"E"}
  327.       urDirectEntry,      {"D"}
  328.       urResolve,          {"R"}
  329.       urVerify,           {"V"}
  330.       urAssign,           {"G"}
  331.       urEdit,             {"I"}
  332.       urAdmin,            {"A"}
  333.       urReview);          {"W"}
  334.   TUserRights = set of TUserRightsElement;
  335.  
  336. const
  337.   urAllRights = [urEntry..urReview];
  338.   SRightsChars = 'EDRVGIAW';  { order must match enums }
  339.   SRights : array [urEntry..urReview] of PChar = (
  340.     'Bug Entry','Direct Entry','Resolve','Verify',
  341.     'Assign','Edit','Admin','Review');
  342.  
  343.   UserSects: array[1..3] of PChar = (csFoundBy, csSubBy, csProgrammer);
  344.   UserCnts: array[1..3] of Integer = (0, 0, 0);
  345.   RightChars: array[1..3] of Char = ('E', 'V', 'R');
  346.  
  347. implementation
  348.  
  349. end.
  350.