AccuWork™ Command-Line Interface : Interface to the Change Package Facility

Interface to the Change Package Facility
AccuWork issue records are used to implement the change package facility. The set of changes in a change package is indicated by a set of “Versions”, listed on the Changes subtab of an issue record, each with a corresponding “Basis Version”:
Each Version / Basis Version pair defines a set of changes to the element: the changes made since the Basis Version was created, up to and including the Version. The change package consists of such Version / Basis Version “patches” for any number of elements.
Various user commands and triggers maintain the contents of a change package: adding new versions and removing existing versions. There are also commands for comparing the contents of a change package to the contents of a stream, enabling you to easily answer the question, “Have all the changes made for Task A been propagated to Stream B?”
The following sections describe the CLI to the change package facility.
Adding Entries to a Change Package
The following XML document requests the adding of two entries to the change package of issue record #433: for the element with element-ID 3, record the series of versions between Basis Version 4/3 and Version 4/6; for the element with element-ID 7, record the series of versions between Basis Version 4/2 and Version 4/9.
<acRequest>
<cpkadd>
<user>john</user>
<depot>etna</depot>
<stream1>etna_dvt</stream1>
<issues>
<issue>
<issueNum>433</issueNum>
<elements>
<element
id="3"
real_version="4/6" basis_version="4/3">
<element
id="7"
real_version="4/9" basis_version="4/2">
</element>
</elements>
</issue>
</issues>
</cpkadd>
</acRequest>
Removing Entries from a Change Package
The following XML document requests the removal of the change-package entry for the element with element-ID 3 from issue record #433.
<acRequest>
<cpkremove>
<user>john</user>
<depot>etna</depot>
<stream1>etna_dvt</stream1>
<issues>
<issue>
<issueNum>433</issueNum>
<elements>
<element
id="3"
real_version="4/6">
</element>
</elements>
</issue>
</issues>
</cpkremove>
</acRequest>
Listing the Contents of a Change Package
The following XML document requests the listing of the change packages of issue records #433 and #512.
<acRequest>
<cpkdescribe>
<user>john</user>
<depot>etna</depot>
<stream1>etna_dvt</stream1>
<issues>
<issueNum>433</issueNum>
<issueNum>512</issueNum>
</issues>
</cpkdescribe>
</acRequest>
Note that a <cpkdescribe> query is the only way to retrieve an issue record’s change package data. A <queryIssue> query retrieves all the other fields, but not the change package data.
Listing Transactions that Affected Change Packages
The following XML document requests the listing of certain transactions in the range 488–569, including the numbers of the change packages (issue records) modified by those transactions.
<acRequest>
<cpkhist>
<user>john</user>
<depot>etna</depot>
<transaction1>569</transaction1>
<transaction2>488</transaction2>
</cpkhist>
</acRequest>
The transactions listed include explicit change-package requests (kind=dispatch, operation=cpkadd or cpkremove). Also included are promote transactions that triggered cpkadd operations.
Creating a Relationship between Two Issue Records
The following XML document creates a Duplicate (type=1) relationship between issue records #337 (the parent) and #198 (the child):
<relateIssue issueDB="UserReportedBugs">
<relationship
type="1"
issueNum1="337"
issueNum2="198">
</relationship>
</relateIssue>
Removing a Relationship between Two Issue Records
The following XML document removes a Duplicate (type=1) relationship between issue records #337 (the parent) and #198 (the child):
<unrelateIssue issueDB="UserReportedBugs">
<relationship
type="1"
issueNum1="337"
issueNum2="198">
</relationship>
</unrelateIssue>
Listing Issue Record Relationships
Following is an XML template for reporting ...
<listRelatedIssues issueDB="depot-name">
<relationship
type="type-number"
issueNum="issue-number"
relationship="kind">
</relationship>
</listRelatedIssues>
The placeholders in this template are:
depot-name
The name of the depot in which the issue resides.
type-number
1 (Duplicate)
3 (Sub Task)
4 (Dependency)
5 (Tracking)
issue-number
The integer number of the issue record whose relationships are to be listed.
kind
child, to list the issue records that have issue-number as a child.
parent, to list the issue records that have issue-number as a parent.
all, to combine both the above listings.
 

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