Using Third-Party ITS Keys : Using Third-Party ITS Keys in the CLI

Using Third-Party ITS Keys in the CLI
Once the schema has been configured as described in the previous section, you use third-party ITS keys with a variety of AccuRev CLI input commands by specifying the new “-3” switch in addition to the traditional “-I” switch (for example “-3 -I US23407”). Note that you can also still use AccuWork issue numbers by using the traditional “-I” switch by itself, but you cannot specify both on the same command line.
Here are the AccuRev commands that accept the -3 switch:
Here are some examples of using the promote command with the -3 switch:
Promote a file and associate it with an issue using the third-party issue key:
accurev promote -I <3rd_pty_key> -3 <element_name>
Promote a file and associate it with several issues using third-party issue keys:
accurev promote -I "<3rd_pty_key_1> <3rd_pty_key_2> <3rd_pty_key_3>"
-3 <element_name>
You can also use the third-party keys with the -Fx switch for XML. For example, to promote a file using the -Fx switch and associate it with several issues using third-party issue keys:
accurev promote -Fx -l <xml_filename>
where the XML file has the following format:
<issues third_party=”true”>
<id>[3rd_pty_key_1]</id>
<id>[3rd_pty_key_2]</id>
<id>[3rd_pty_key_3]</id>
</issues>
Commands That Return Third Party Issue Numbers
These commands return third-party key information in XML output (specified with the -fx switch):
cpkdepend also returns third-party key information in non-XML format. If you specify -3 to query the dependency, then the values in non-fx will be displayed using third-party values. If specify standard issue numbers, they will be displayed in standard format. If you specify -3 without -fx and an issue does not have a third-party value, an asterick ('*') appears before the issue number.
In the examples below, the third-party values are displayed in bold. "thirdPartyName" is the field name (not the label name) defined in the Schema Editor.
hist example output
<version
path="\.\file.cpp"
eid="3"
virtual="4/2"
real="5/2"
virtualNamedVersion="s25263_proj1_dev/2"
realNamedVersion="ws25263_testuser1/2"
elem_type="text"
dir="no">
<issueNum
thirdPartyName="jiraKey"
thirdPartyValue="J1002">2</issueNum>
</version>
cpkdepend example output
<acResponse>
<issueDependencies>
<issueDependency>
<issues>
<issue
number="2"
thirdPartyName="jiraKey"
thirdPartyValue="J1002"
incomplete="false"/>
</issues>
<dependencies>
<issue
number="1"
thirdPartyName="jiraKey"
thirdPartyValue="J1001"/>
</dependencies>
</issueDependency>
</issueDependencies>
</acResponse>

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