It's all about the answers!

Ask a question

DNG attribute change of data type

Karthik Krishnan (8805113160) | asked Nov 07, 10:00 a.m.
We have following attribute 

Attribute Name: TVersion
(Current) Data Type: String
(New) Data Type: Enumeration

We have following scenario:

  • In few components the above attribute was created with data type String.
  • We want to change that to an Enumeration.
  • Fortunately, the contents for this attribute are filled in only by admin and is at the module level
We see 2 options to achieve this
  1. Delete the current attribute and recreated with new data type but with original uri
  2. Rename the current attribute and uri and recreate a new attribute with same uri 
We prefer option 1.

What are the things that should be considered before proceeding with this? does anything get affected in JRS or any other apps?

thank you

Accepted answer

permanent link
Diana Kraaijeveld (55227) | answered Nov 07, 11:20 a.m.
edited Nov 07, 11:30 a.m.
I will try to answer this from the ERM/Doors Next perspective:

-What option you should use also depends on what you want to achieve:

If the current attribute, of data type String, is assigned to any artifact types?
If so: Do your artifacts/requirements have any values assigned for the current attribute?
If so: Do you need to see these values, and perhaps want to assign them to the new replacement attribute you will be creating with the enumeration data type?

In that case it would be best to:
-First rename the original attribute and its rdf uri to 'TVersion-Old' for example.
-Then create the new 'TVersion' attribute with the enum data type (assuming you add values to its enum-list that may also currently be assigned to the original string attribute for artifacts)
-And assign the new attribute to the artifact types that also have the 'TVersion-Old' attribute assigned.

This way you can export your artifacts (per type) to csv or Excel with the old and new attribute, and then copy the data from the new- into the new attribute in the resulting sheet and import it back in. This would be a way to populate the new attribute of the artifacts with the value that was assigned to the old attribute.
Once you are done, you can remove the original attribute  'TVersion-Old' from the artifact types and delete it.

One thing to keep in mind: Also when you delete the current attribute, and then recreate it with a the same name and RDF URI, but with a different data type: The type URL in the type system feed will not be the same for the new attribute.
So from an RM perspective it will not be the same attribute, even if it has the same RDF URI and name.

Also: In baselines created before these changes, artifacts will of course still be referencing the old attribute.

The effect all of this  has on reporting I gladly leave to my reporting support colleagues.
Karthik Krishnan selected this answer as the correct answer

Karthik Krishnan commented Nov 08, 10:53 a.m.

Thanks, Diana for your detailed answer.  While we use a component to manage template, somehow while creation this was done wrong on few components. 

We also use GCM just as an additional info.

One other answer

permanent link
Diana Kraaijeveld (55227) | answered Nov 07, 11:27 a.m.
One more thing I'd like to add is these articles with best practices on maintaining your type systems in CM enabled projects, that suggests to use a dedicated 'master component' in which to make all your type system changes, and from there propagate it to the other components and streams using the procedure described in the article:

Note that it also contains links to part 2 and 3 for automating this

Your answer

Register or to post your answer.