Guideline: Enhanced Defect Business Logic with RTC
This guideline describes the business logic functions for the Rational Team Concert STG Defect work item and their default settings.
Relationships
Related Elements
Main Description
The business logic functions related to the STG Defect are listed below. Those in the first table are enabled for all users and are not configurable. The functions in the second table are turned on by default. Note: In the tables below all references to Defect are referring to the STG Defect Work Item. Change Record refers to the Change Record Work Item.

STG Defect Business Logic Functions which are Not Configurable

Business Logic Function

Description

Change Records are unique for each Internal Release value

You may create only a single Change Record for each Internal Release value. Planned For is not required on a Change Record.

All child Defects must be resolved before the parent Defect can be fixed

All child Defects must be either Verify or Closed state before the parent can be moved to Fixed state.

All Change Records must be closed before the parent Defect may be closed

All child Change Record Work Items must be closed before their parent Defect can be closed.

All Change Records must be in NoChange, Canceled, Verify, or Closed state when fixing a Defect

All Change Records must be NoChange, Canceled, Verify, or Closed state when fixing a Defect.

All Change Records must be in NoChange, Canceled, or Closed state when closing a Defect

All Change Records must be in NoChange, Canceled, or Closed state when closing a Defect.

Ensure all Change Records are Closed, NoChange or Canceled when these actions are run on the parent Defect: MoreInfo, Reject, Reopen

If the parent Defect is not Closed, and these actions are performed (MoreInfo, Reject, or Reopen), ensure that all child Change Records are either Closed, NoChange, or Canceled.

Automatically set Defect and Change Record owners, if possible

If a Defect or Change Record is submitted with the owner left unassigned, use these steps to try to assign the owners: 1) Use the category owner as defined in the project’s metadata; 2) Set the Change Record owner to the parent Defect owner; 3) If the parent Defect owner is unassigned, set the Change Record owner to the category owner for the Change Record; 4) If the Change Record owner is still unassigned, set the Change Record owner to the category owner as specified in the metadata.

Validate built-in attachments are less than 5MB

Ensure all attachments are less than 5MB in size.

Prevent user from removing others’ subscriptions

Any user can add other users to Work Item subscription lists, but can only remove themselves.

Once a Change Record is linked to a Defect, the link cannot be removed

Change records cannot be moved between Defects. Deleting the link from the Defect or the Change Record is prevented.

Defect must be in working state to link with Change Records

Change Records can be linked to Defects only if the Defect is in Working status.

There may only be one Change Record for any release for the parent Defect, and the release cannot be changed

A Change Record’s Internal Release value cannot be set to a value which is already used by another Change Record for that parent Defect. Once the Change Record is submitted, its Internal Release value may not be changed.

Defect RejectFix action is not allowed if Change Record is in Verify or Closed status

The RejectFix action on a Defect (Verify -> Working) is not allowed when associated Change Records are in either Verify or Closed states. (The precondition which requires the Change Record to be resolved before Defect must also be enabled.)

Defects with active Change Records cannot be moved to other projects

Defects cannot be moved to other projects in the repository if the Defect has associated Change Records in either Open, Working, or Verify states.

Make Discussion field required

Text must be added to the Defect’s Discussion field when the following actions are done: Reject, MoreInfo, Reopen (from Rejected and MoreInfo), Closed.

Setting Blocking checkbox requires comment

If the Blocking checkbox is set, a comment describing the blocking condition must be added. Use of this checkbox has no affect on the workflow of the Work Item.

Move Change Record state to Working when a change set is associated with it.

When a change set is associated with a Change Record, the state of the Change Record automatically moves to Working.

Ensure all change sets associated with a Change Record are complete before the Change Record can move to CodeComplete, Verify, Closed, Canceled or NoChange state

All change sets associated with a given Change Record must be completed before the Change Record can move to CodeComplete, Verify, Closed, Canceled or NoChange state. Change sets complete automatically when delivered to a stream.

Change sets may be associated with Remote Change Requests

A change set may be associated with a Remote Change Request in order to deliver changes.

Change sets must be associated with a work item

A change set must be associated with a work item before delivering that change set. In RTC 3 that work item could be any type except STG Defect. In RTC 4, the change set can be associated with any type of work item, if the STG Defect / automatic Change Record functionality is enabled.

Prevent parent defect category change with active children

If an STG Defect with child Change Records has the defect's category changed, both the STG Defect and Change Record's category are changed, but only if all Change Records are not active (Canceled, Closed, NoChange).

STG Defect Business Logic Functions which are Enabled by Default

Business Logic Function

Description

A Defect may not be closed if it has Verification Approvals pending

Ensure all Approvals of type Verification for a Defect are either Approved or Rejected (not Pending) before the Defect can move to Closed state.

Remove verification approvals from Defect when the Defect is canceled

When a Defect is Rejected or Closed with a resolution code of Cancel, all auto-generated Approvals of type Verification will be removed.

Update subscription lists when owners change

If a Defect’s owner changes, add the new owner into the subscription list of both the Defect and any children Change Records. Do not remove the old owner from any subscription lists.

If a canceled Defect is re-opened, new verification approvals will be re-created as defined in project configuration metadata

When a Defect is canceled, any Verification Approvals are removed. If the Defect is re-opened, Verification Approvals will be re-created as defined in the project’s configuration metadata (not necessarily on the re-open action).

Auto-close the Defect if all child Change Records are in Closed, Canceled, or NoChange status

Defect will automatically be closed if: * Defect is in Verify status * All Verification Approvals are either Accepted or Rejected (not Pending) * All Change Records are in either Closed, Canceled, or NoChange status.

Move Defect to Verify status if all Change Records are in either Closed, Canceled, or NoChange status

Move Defect to Verify status if: 1) Defect has been accepted; 2) All Change Records are in either Closed, Canceled, or NoChange status.

Create a Verification Approval when the Defect is moved to Fixed status

Part of approvals configuration: create a verification approval when the Defect is moved to Fixed status.

Check for Approvals configuration change due to release change

If the current iteration changes, the Approvals configuration can be different for the new current iteration. If the new configuration is different, the Approvals will be re-generated according to the new iteration’s configuration.

Ensure Approvals are approved before Fix action is allowed on Change Records

Ensure that all Change Record Approvals are Approved before allowing the Change Record to close.

Automate subscription lists

Maintain the subscription lists for Defects and Change Records: 1) Add both submitter and owner as Defect subscribers; 2) Add parent Defect owner as Change Record subscriber; 3) Add both submitter and owner as Change Record subscriber

Close the Change Record if the last verification approval is either Approved or Rejected

Once a Change Record is in Verify state, close the Change Record when its last verification approval is either Approved or Rejected.

Prevent editing of auto-generated Approvals

Prevent the changing of the name and type of auto-generated Approvals. Default configuration allows only Product Owners to change an Approval’s due date or approver list.

Prevent editing of Planned For Language ID or Operating System values

Prevent the Planned For Language ID or Operating System values from being edited after the Change Record is submitted.

Prevent a change set from being added to a Work Item

Prevent a change set from being added to a Work Item if in a specific state.

Prevent change sets from being removed from a Work Item

Prevent change sets from being removed from a Work Item if in a specific state.

Configuration of new iteration types

New iteration types, with a different set of behaviors, can be configured.

Make Severity Justification field required

The Severity Justification field can be required based on the severity level selected.

Make Priority Justification field required

The Priority Justification field can be required based on the priority level selected.

Auto-close Defect if all Verification Approvals have been verified

When the Defect is in Verify state and all Verification Approvals associated with the Defect have been approved, the Defect will automatically close.

Move Defect to Verify state when all ChangeRecords are closed

When all ChangeRecords associated with the Defect are in Closed state (not Canceled or NoChange), the Defect will move to Verify state.

Move Defect to Working state when Verification Approval is rejected

When a Verification Approval is rejected, the associated Defect moves from Verify to Working state.

Default Change Record summary from parent

If left blank, new Change Record summary will be "CR:" plus the summary from the parent work item.

Approver list configuration

The parent work item submitter and owner are configured to be included in an child work item's automated approval approver list. For existing pending approvals, the approver list will only be updated when a new parent/child link is created or when the owner is modified on the parent.