Using Third-Party ITS Keys : Modifying the schema

Modifying the schema
To make use of third party ITS keys, you must first modify the AccuRev schema. You can do this by either manually editing the schema.xml file, or by using the Schema Editor in the Java GUI (see Schema Editor on page 301 of the AccuRev On-Line Help Guide).
Using the Schema Editor
If you do not wish to edit schema.xml directly, you can use the Schema Editor in the AccuRev Java GUI. Identify an existing key field that can be used, or define a new one using the Add button. Then assign this key field using the 3pty ITS Key dropdown menu.
Note that some AccuRev schemas (like the schemas delivered with AccuSync) already have a third-party key defined, such as “jirakey”. If this is the third-party ITS key that you need to use, you just need to ensure that it is assigned to the 3pty ITS Key dropdown menu as described above, and that it is positioned on the Issue form as described below.
Next go to the Layout tab and position this field in the Issue form (or confirm that it is already there). To position it, select the entry in the Fields column, and then click where you want it to appear in the left side of the tab (for example, in the Header section).
Save your changes and exit the Schema Editor. Now when you display the AccuWork Issue form, the third-party ITS key field will be displayed.
Editing schema.xml
You can also directly edit the schema XML files (schema.xml and layout.xml). In a text editor, open the schema.xml file for your depot:
<ac_install>/storage/depots/<depot_name>/dispatch/config/schema.xml
First, determine if you need to define a new field to handle the third-party ITS key. Note that all AccuRev schemas have an entry for AccuWork issue numbers. For example:
<field
name="issueNum"
type="internal"
label="Issue"
reportWidth="10"
fid="1">
Do not use this for third-party ITS keys. Define a new one (or determine if you already have one available in your schema) and make sure that it is specified in the lookupField as described below.
Some AccuRev schemas (such as the schemas delivered with AccuSync) already have a third-party key defined, such as:
<field
name="jiraKey"
type="Text"
label="JIRA Key"
reportWidth="10"
width="10"
fid="3">
</field>
If you need to define a new key, do so using the above key as an example, making sure to assign it an unused fid (field ID) number.
After identifying a key field, or defining a new one, modify the fid value of the lookupField entry to reflect the new key field (the lookupField entry is typically found near the top of schema.xml:
<lookupField fid="1"/>
For example, if you were modifying this entry to use the jiraKey field shown above, you would change the fid value to “3”.
If you will be using this convention in new depots that you create in the future, you should also make this change to the master copy of schema.xml in:
<ac_install>/storage/site_slice/dispatch/config
To position this field on the Issue form (or to confirm that its position is already defined), open layout.xml in a text editor. Use the existing entries in the file as a model for defining the third-party ITS key field.

AccuRev, Inc.
Phone: 781-861-8700
Fax: 781-861-8704
support@accurev.com