Duplicate Favorites Issue when upgrading a project from QC 10.00 or earlier to ALM 11.00 and versions above

In Application Lifecycle Management (ALM) 11 if you get the below error :

[SQLServer JDBC Driver][SQLServer]The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name ‘td.FAVORITES’ and the index name ‘FAVORITES_NAME_LWR_UK’. The duplicate key value …

The reason for this error is because , in Quality Center (QC) 10.00 and earlier versions of QC it was possible to have different kind of favorite filters (for Grid and Tree views) with the same name.

In ALM 11.00 and above the favorites were consolidated to the ‘Favorites’ menu in both of the views (Tree and Grid Views). Duplicate names are also not allowed in later versions. This is causing the upgrade error in ALM 11.

There is no fix available for this issue now. Until a fix will be implemented the following workaround for the project can be applied

1. Run the following query:

SELECT DISTINCT a.CSET_NAME, a.CSET_OWNER FROM td.COMMON_SETTINGS a, td.COMMON_SETTINGS b

WHERE a.CSET_CATEGORY in (‘PLANN_GRID_VIEWS’,’PLANN_VIEWS’)

and b.CSET_CATEGORY in (‘PLANN_GRID_VIEWS’,’PLANN_VIEWS’)

and a.CSET_NAME <> ‘__default__’

and b.CSET_NAME <> ‘__default__’

and a.CSET_OWNER <> ‘__default__’

and b.CSET_OWNER <> ‘__default__’

and a.CSET_OWNER = b.CSET_OWNER

and a.CSET_NAME = b.CSET_NAME

and a.CSET_CATEGORY <> b.CSET_CATEGORY

order by a.CSET_NAME

2. For each row (CSET_NAME, CSET_OWNER) pair in the result run the following query:

UPDATE td.COMMON_SETTINGS

SET CSET_NAME = CSET_NAME + ‘_tree’

Where CSET_NAME = ‘<CSET_NAME>’ and CSET_OWNER = ‘<CSET_OWNER>’ and CSET_CATEGORY =’PLANN_VIEWS’

Replace the <CSET_NAME> with the row CSET_NAME value from the result of query 1, and <CSET_OWNER> with the row CSET_OWNER value from the result of query 1.

Advertisements

One thought on “Duplicate Favorites Issue when upgrading a project from QC 10.00 or earlier to ALM 11.00 and versions above

  1. chiropractors prescott

    I do agree with all of the ideas you have offered on your post.
    They are very convincing and will definitely work.
    Still, the posts are too brief for beginners. May you please prolong them a
    little from next time? Thank you for the post.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s