It's all about the answers!

Ask a question

Implications of changing a custom attribute type from long t


Jeremy Hughes (2164837) | asked Dec 10 '08, 7:08 a.m.
Hi, I've added a custom attribute to a work item type in the process
configuration using the GUI. I set it to be of type 'long' and now I'd
like to go back and change it to 'string'. There is already a small
amount of work items in the Jazz repository with a 'long' value. The
process configuration GUI won't let me change the type to 'string' but
then there's always the option of going in and change the process
configuration source.

What are the implications of changing this? Since all longs can be
represented as strings is there really an issue here?

Any further advice appreciated.

Thanks,
Jeremy

3 answers



permanent link
Patrick Streule (4.9k21) | answered Dec 12 '08, 4:08 a.m.
JAZZ DEVELOPER
On Wed, 10 Dec 2008 13:03:16 +0100, Jeremy Hughes
<Jeremy> wrote:

Hi, I've added a custom attribute to a work item type in the process
configuration using the GUI. I set it to be of type 'long' and now I'd
like to go back and change it to 'string'. There is already a small
amount of work items in the Jazz repository with a 'long' value. The
process configuration GUI won't let me change the type to 'string' but
then there's always the option of going in and change the process
configuration source.

What are the implications of changing this? Since all longs can be
represented as strings is there really an issue here?

Any further advice appreciated.

Integer and String attribute custom attribute values are stored
differently in the repository, so the manual type change would lead to
empty values for your existing work items. While Longs can be represented
as Strings, there is a fundamental difference in terms of querying them.
E.g. we support 'greater than' for numbers, but not for strings.

But a controlled way to migrate the type of an attribute could make sense
and is worth an enhancement request IMO.

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Jeremy Hughes (2164837) | answered Dec 12 '08, 10:38 a.m.
On 12/12/2008 08:58, Patrick Streule wrote:
Integer and String attribute custom attribute values are stored
differently in the repository, so the manual type change would lead to
empty values for your existing work items.

Is that the only side effect. That's not so bad as there are only a few.

While Longs can be
represented as Strings, there is a fundamental difference in terms of
querying them. E.g. we support 'greater than' for numbers, but not for
strings.

But a controlled way to migrate the type of an attribute could make
sense and is worth an enhancement request IMO.


Sure, I could open one. It might turn into a hairball though as you'd
need to figure out what to do for converting any type to any other type.
You could disallow some (most?)

Jeremy

permanent link
Marcel Bihr, Jazz Work Item team (1.4k) | answered Dec 15 '08, 4:52 a.m.
JAZZ DEVELOPER
Hi Jeremy
The type change in the process spec will have no effect, as the attribute already exists in the repository. The attribute will keep its type (which is long). IMO the easiest way is add a new attribute of type string and use that in new work items.

Regards

Marcel
Jazz Work Item team

Your answer


Register or 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.