A. The Schema Editor (Administrators Only) : Change Packages Tab

Change Packages Tab
AccuRev Enterprise supports an enhanced integration between AccuRev and AccuWork: any AccuWork issue record can act as a change package, keeping track of which versions were created to fix the bug (or implement the new feature) described in that issue record. For a thorough discussion, see the topic Change-Package-Level Integration between AccuRev and AccuWork.
The Change Packages subtab configures the way in which change packages are reported and updated, on a depot-by-depot basis.
Change Packages Subtab Layout
The Change Packages subtab specifies the change-package configuration for the current depot. It is organized as follows:
In the Change Package Results section, you specify the format of the change-package table displayed by a Show Issues or Show Diff By Issues command. This set of fields is also used to identify issue records in the Issue Dependencies tab.
In the Change Package Triggers section, you enable the change-package-level integration between AccuRev and AccuWork, by specifying one or more AccuWork queries, one of which will be invoked during execution of the Promote command. (The user chooses one or more of the issues records selected by the query; AccuRev adds the promoted versions to those issue record(s)' change packages.) In this section, you also specify the format of the table that displays the results of the Promote-time query to the user.
In addition, the Issue Owner Field drop-down list displayed at the bottom of the tab can be set to any AccuWork field that contains user/group data. The field specified here displays on the Send to Issue dialog, and allows the user to choose an issue belonging to another user or group.
Working in the Change Package Results Section
Click the Setup Columns button to bring up a dialog box in which you select a set of issue fields, to be displayed as table columns. See Set Up Columns. You can also specify the order of the fields.
After closing this dialog box, you can adjust column widths and change the order of columns. (See Working with Tables.)
Working in the Change Package Triggers Section
This section contains a set of condition/query pairs, one of which will be executed at Promote-time. If the first condition is satisfied, the first query will be executed; otherwise the second condition will be evaluated, and if it's satisfied, the second query will be executed; and so on. No error occurs if no condition is satisfied; the Promote command proceeds without triggering any change-package-level activity.
Note that there is no checkbox or button to enable the change-package-level integration. Rather, the existence of one or more condition/query pairs in this section implicitly enables the integration.
Composing a Condition
Each clause of a condition performs a test on the Promote destination stream (indicated by the keyword PROMOTE_DEST_STREAM). For example, this condition is satisfied if the user is promoting to either of the streams maint or forms:
The mechanics of composing the condition are similar to that of composing an AccuWork query (see Working in the Query Editor).
Composing a Query
Corresponding to each Promote-destination condition is any AccuWork query, to selects a set of issue records. For the mechanics of composing the query, see Working in the Query Editor.
Formatting the Table Displayed by the Change Package Trigger
To specify the format of the table displayed by the Promote command when it invokes the change-package-level integration between AccuRev and AccuWork, click the Setup Columns button to bring up a dialog box. Use this dialog box to select fields to appear as columns, the order of the columns (fields), and the sort order of the rows (records). After closing this dialog box, you can adjust the column widths and rearrange the columns.
Change-Package-Level Integration between AccuRev and AccuWork
AccuRev provides a change package feature that integrates AccuRev's configuration management functionality with AccuWork’s issue management functionality.
When a Promote command is executed a user's workspace (but not in a higher-level dynamic stream), the change-package-level integration records all the promoted versions on the Changes subtab of a user-specified AccuWork issue record.
Enabling the Integration
The change-package-level integration is enabled on a depot-by-depot basis. Open the Schema Editor for a particular depot, and go to the Change Packages subtab. Filling in the lower section, "Change Package Triggers", enables the integration for that particular depot.
The Change Package Triggers section is structured as a set of condition/query pairs. One of the queries will be selected for execution at Promote-time. If the first condition is satisfied, the first query will be executed; otherwise the second condition will be evaluated, and if it's satisfied, the second query will be executed; and so on. 
Each clause of a condition performs a test on the Promote destination stream. For example, this condition is satisfied if the user is promoting to either of the streams maint or forms:
The condition must test the destination stream (PROMOTE_DEST_STREAM) of a Promote command. The query corresponding to each condition can be any AccuWork query, which selects a set of issue records.
The Change Package Triggers section also specifies the format of each query's results table -- the fields to appear as columns, the column widths, the order of the columns (fields), and the sort order of the rows (records).
In addition, the Issue Owner Field drop-down list displayed at the bottom of the Change Packages tab can be set to any AccuWork field that contains user/group data. The field specified here displays on the Send to Issue dialog.
Triggering the Integration
Once the integration is enabled for a depot, it is triggered whenever a user performs a Promote command in a workspace associated with that depot:
1.
2.
Note: If you have enabled the use of third-party issue tracking system (ITS) keys in the AccuWork schema, the Select Issue (Change Package) dialog displays additional controls that let you specify whether you want to use AccuWork issue numbers or third-party keys when selecting issues to promote against. See the section called, “Using Third-Party Keys in the AccuRev GUI,” in Appendix A (The Schema Editor (Administrators Only)) of the AccuRev Online Help Guide for more information.
3.
Promoting to Issues Other than Those Shown -- The dialog has a New Issue button, which enables the user to create a new issue record "on the fly". If the user hovers over the icon to the right of the New Issue button, it will display a tooltip containing the Change Package Triggers query. This makes it easier to create an issue that will be selected by the query, and thus available to promote against.
There may also be a user field to the right of the Issue # field that can be used to show issues belonging to another user.
Typing an Identifier when using a Third-Party ITS -- If a field other than the default issueNum is specified as the 3pty ITS Key (on the Schema Editor’s Schema subtab), specifying issue records by typing their identifiers can lead to errors: if multiple issue records have the same identifier, AccuRev automatically adds the promoted version(s) to just one of those records — perhaps not the one you intended.
4.
5.
What happens if the user specifies no issue record or a non-existent issue record, such as 99999 or 0?
If the user enters "0" (or equivalently, makes a blank or non-numeric entry), AccuRev checks whether issue record #0 is among the issues selected by the query executed Step 1. (Note: the query can select issue record #0, even though it doesn't exist -- for example with this clause: issueNum equal to 0.)
If the query does select issue record #0, the user's command completes but no information is recorded in the issue. This provides a way for the user to bypass the integration when performing the Promote command.
If the query does not select issue record #0, the user's command is cancelled, and no information is recorded in the issue.

Micro Focus