Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Can I change a custom attribute from medium string to large string?

Hello,

Our work item for backporting changes uses  a custom attribute to track instructions for applying the fix. The custom attribute is a Medium String.

If the attribute is not empty when change sets associated with the work item are included in a release, a script adds the text from the custom attribute to the readme.txt file that ships with the fix.

Medium string is not long enough for the instructions. How can this attribute be changed to use a Large String instead without losing what is already on existing work items?

Thanks,
Ruby
Martha (Ruby) Andrews
Jazz Foundation L3 Development Lead

0 votes


Accepted answer

Permanent link
You cannot change the type of an existing attribute.   You would have to create a new custom attribute, and then write a script that would find all work items with the old custom attribute, and copy its value the new custom attribute.
Ralph Schoon selected this answer as the correct answer

1 vote

Comments

and then update the script which adds the text from the custom attribute into the readme file to now take into account the reading from the new custom attribute instead of the old custom attribute.

once you copy the data from the old field to the new field, you can rename the old one out of the way, and the new one to the old name. the ID string will be different, but the name will be right.


One other answer

Permanent link
 Hello Ruby,
Geoff is correct - you can not change an attribute's type.
And you'll have to create a new attribute.
Now the tricky thing is to move the old attribute values for existing work items.
As Geoff suggested, you may write a script.
Another option I used in similar cases is to CSV export your work items - only id's and your old attribute's values.
Then CSV Import and map old to new attribute.

Eric

1 vote

Comments

Problem with string attributes sometimes seems to be the line breaks. You can only try.
I am considering to put something into the workitem command line if it can be kept simple.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 369

Question asked: Feb 12 '15, 5:53 p.m.

Question was seen: 4,504 times

Last updated: Feb 14 '15, 12:38 a.m.

Confirmation Cancel Confirm