It's all about the answers!

Ask a question

Is it possible to update the type of an attribute?

Steve Willems (8811311) | asked Mar 22 '13, 6:12 a.m.
edited Mar 22 '13, 6:14 a.m.
In project 1, a custom attribute with id=att_yesno and of type enum (pointing to the enum with id=yes/no) was added to a defect WI. 

In project 2, which serves now as reference process, the same custom attribute with id=att_yesyno of type enum (but pointing towards the enum with id=yesno) was added long time ago.

When forcing project 1 to use project 2 process to facilitate process management, RTC is unable to detect the enum of that custom attribute of the defect in project 1.

My question is whether it is possible to do an update of the process in project1 in order to use the new enumeration with id=yesno? (probably some db manipulation is needed??)

I could add also the enum with id=yes/no but this is of course overhead. I tried it anyway and it works but this change blocks the operation behavior on the defect attribute att_yesno because I believe RTC is being confused by the fact the same attribute is pointing towards 2 different enumeration in the 2 projects.

<enumeration attributeTypeId="yesno" name="Yes/No">
<literal icon="processattachment:/enumeration/thumb-up-icon.png" id="yesno.literal.l2" name="Yes"/>
<literal default="true" icon="processattachment:/enumeration/thumb-icon.png" id="yesno.literal.l4" name="No"/>

<enumeration attributeTypeId="Yes/No" name="Yes/No">
<literal icon="processattachment:/enumeration/thumb-up-icon.png" id="Yes/No.literal.l2" name="Yes"/>
<literal default="true" icon="processattachment:/enumeration/thumb-icon.png" id="Yes/No.literal.l4" name="No"/>

Accepted answer

permanent link
Ralph Schoon (62.9k33645) | answered Mar 22 '13, 8:01 a.m.
Steve, I am not sure if this is possible. I'd rather think it is not. I assume the ID's are stored somewhere in the database and used to find the attribute value.

If I had to solve that I would probably take a different approach - on a test server first.

I would export the values of the work items with their old process using a query - you might have to increase the query limit for that f you have more than 1000 items.
I would then change the process and synchronize the attributes to get the new enumeration, if possible. Then I would use the export of the work items and update the work items. I would try to import the CSV results and map the enumeration to my new ID - make sure the literals match.

Steve Willems selected this answer as the correct answer

One other answer

permanent link
Steve Willems (8811311) | answered Apr 02 '13, 4:56 a.m.
 @ralph, I have a test environment so I can try it, but with this approach, will all links not be lost? (e.g. links with RQM)

Ralph Schoon commented Apr 02 '13, 5:13 a.m.

The suggestion is to export the attribute data into CSV, include the work item ID in the export.
Then import data - only using the ID and the column renamed for the new attribute. Choose update existing work items. You might have to figure the mapping out, however, since you just update just the new work item attribute from the data of the old one, into the existing work item, you should not loose anything.

Your answer

Register or to post your answer.