How to remove all references in CR or CRI record in ClearQuest?

The place to ask a general ClearQuest question
xuezhilei40308
Posts: 1
Joined: Tue Dec 01, 2015 11:07 pm

How to remove all references in CR or CRI record in ClearQuest?

Postby xuezhilei40308 » Tue Dec 01, 2015 11:17 pm

Hi expert,

In ClearQuest, we want to delete old records with creation date earlier than Dec 31st 2012 in production.

When I tried to delete a CR which as AIs, CRIs, DWOs, TWOs, QUESTS as child records, the action was always failed because of lots of circular references between CR/CRI and other record type (including stateless record type).

How can I remove all references in CRI or CR? Now I only can remove some AffectedItem reference with CRI and CR in perl script, and then delete CRI records successfully. But there are still lots of other references. Some of them I know, some of them I don't know. For those old records, I also don't know what kind of references were existed in those old records.

Pavel
Posts: 281
Joined: Fri Dec 12, 2008 12:19 am

Re: How to remove all references in CR or CRI record in ClearQuest?

Postby Pavel » Wed Dec 02, 2015 7:20 am

Hello,

All references are store in the "parent_child_links" table:
parent_dbid - DB ID of the parent record
parent_entitydef_id - parent entity ID (record name can be found in the "entitydef" table)
parent_fielddef_id - parent field ID (field name can be found in the "fielddef" table)
child_dbid - DB ID of the child record
child_entitydef_id - child field ID (field name can be found in the "fielddef" table)
child_fielddef_id - child field ID (field name can be found in the "fielddef" table)

Technically, there are two options:
1) you can find all records where the record that should be deleted is listed as child and update each of them to remove reference before deleting the record.
2) you can remove all entries from the parent_child_links where the record is listed as child using direct SQL, but this option is not supported, and none of the ClearQuest hooks would be fired in this case.

Thank you,
Pavel


Return to “General ClearQuest Questions”

Who is online

Users browsing this forum: No registered users and 3 guests

cron