In the AccuWork CLI, you identify a field by its field-ID, not by its field-name. Thus, before doing any real AccuWork CLI work, you must determine the correspondence between field-IDs and field-names for issues in your depot. This information is stored in the schema configuration file on the AccuRev Server host:
accurev getconfig -p <depot-name> -r schema.xml
Extract the name= and fid= text lines from this data, and store them for future reference. You’ll need to refer to this information often as you work with the AccuWork CLI. Let’s call this extracted data the field-ID definitions.
For example, the field-ID definitions for the default schema look like this:
This data shows that field submittedBy has field-ID 10, field productType has field-ID 6, etc.
Note: All examples in the remainder of this document will use the field-ID/field-name correspondence in the above example.
The contents of these XML elements are the field values for issue record #1. A couple of them, submittedBy and dateSubmitted, have values that might be a bit surprising — numbers instead of strings. We’ll discuss these kinds of values in Selecting Issue Records with a Query.
AccuWork CLI Operations
You can perform the following AccuWork operations through the command-line interface.
Before performing any of these operations, be sure you have first determined the correspondence of Field-ID and Field-Name.
Query issues in a depot (
<queryIssue>document) — Retrieve the contents of all issue records in a particular depot that match a specified query.
Create a new issue record (
<newIssue>document) — Enter a single new issue record in a particular depot.
Modify an existing issue record (
<modifyIssue>document) — Change the contents of a single issue record that already exists in a particular depot.
Add or modify an entry in an issue record’s change package (
Remove an entry from an issue record’s change package (
List the entries in an issue record’s change package (
Display history in terms of change packages (
<cpkhist>document) — List transactions and the change packages that they modified.
Create or remove a Duplicate relationship between two issue records (
Report issue relationships (
<listRelatedIssues>document) — List records that are related, through the Duplicate relationship, to a particular issue record.
Compare the change packages in two streams, snapshots, or workspaces (
Display the issues whose change packages are in a particular stream, snapshot, or workspace (