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 |
Accepted answer
Geoffrey Clemm (30.1k●3●30●35)
| answered Feb 13 '15, 1:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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
Comments
Susan Hanson
commented Feb 13 '15, 8:05 a.m.
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.
sam detweiler
commented Feb 13 '15, 8:09 a.m.
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
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
Comments Problem with string attributes sometimes seems to be the line breaks. You can only try.
|
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.