Labels

Wednesday, June 6, 2012

Field < Subject > requires a value from the corresponding list

The error message can be faced when performing various actions with Tests or Defects in Quality Center (QC) that concern their Subject field – moving, editing Subject, uploading Tests/Defects via Excel add-in etc.

Cause:-

The issue is caused by wrong value for Subject field type in the Database. The below query, run on the affected project / SYSTEM_FIELD TABLE/ returns the current value :
SELECT sf_table_name, sf_column_name, sf_root_id
FROM system_field
WHERE (0 = 1)
OR sf_column_name LIKE ‘TS_SUBJECT’
OR sf_column_name LIKE ‘BG_SUBJECT’

The result in case of corruption is:
SF_table_name      SF_column_name            sf_root_id
______                      ___________                   ___________
BUG                             BG_SUBJECT                        284
TEST                           TS_SUBJECT                         284

Fix

This minor DB corruption occurs per project and with Patch 2 for ALM 11 is fixed. Already affected projects have to be manually repaired.
HP has released a fix for this issue. Please contact HP Support to request ALM 11 Patch 2 or later.
The following query has to be run upon the affected project(s):
1. Login to QC Site Admin
2. In Site Projects  navigate to the affected project
3. Select SYSTEM_FIELD table
4. Execute:
UPDATE system_field
SET sf_root_id =
(SELECT al_item_id
FROM all_lists
WHERE (0 = 0)
AND al_description LIKE ‘Subject’
AND al_father_id = 0)
WHERE (0 = 1)
OR sf_column_name LIKE ‘TS_SUBJECT’
OR sf_column_name LIKE ‘BG_SUBJECT’
5. Verify the current state:
SELECT sf_table_name, sf_column_name, sf_root_id
FROM system_field
WHERE (0 = 1)
OR sf_column_name LIKE ‘TS_SUBJECT’
OR sf_column_name LIKE ‘BG_SUBJECT’
The returned values are:
SF_table_name         SF_column_name          sf_root_id
_____________      ___________                   ___________
BUG                                 BG_SUBJECT                          2
TEST                                TS_SUBJECT                          2
6. On completion the Cache folder on the used client machine has to be deleted – its default location is “%temp%\TD_80″

No comments:

Post a Comment