Cleaning database ofHello, old attributes and datatypes

Hello,

I was wondering what would be the best apporach when trying to write a script to delete all legecy attributes and types nolonger needed? I am trying to clean up my database and there are serveral attribute that are nolonger needed I believe it would be usier to have a list of valid attributes and datatypes and delete everything else what would be the best apporach when in DXL?

Is there a way of creating a master datatype that all modules would share rather than having each module having a verision of that datatype. I know this is the way the DOORS NG is going to handle datatypes.

Thank you,
Jim
SystemAdmin - Tue Nov 29 08:32:15 EST 2011

Re: Cleaning database ofHello, old attributes and datatypes
OurGuest - Tue Nov 29 10:58:41 EST 2011

I think this type of activity should be put on the back burner -- no hero will be declared on this type of tasks. Probably just villains and victims will be spotlighted.

Re: Cleaning database ofHello, old attributes and datatypes
llandale - Tue Nov 29 14:07:13 EST 2011

[1] If you are confident you can define a set of "current" attributes and can delete all the others...

I'd be tempted to create an "Attribute Template" module, one for each kind of module you have (Requirements, TestProcedures, whatever), then write a script that finds each production module and opens it, determines its type, read the attributes of that type's Template, then plow through the module deleting attributes not in the template.

I'm a chicken and would never even consider writing such a blast away script like this even if I were confident in enforcing my "perfect" project policies; which they are not and I am not. Someone has surely created some useful attributes and didn't tell me. If I did I would add serious santity checks such as finding out when the attribute was created, how many objects had specific values for it, and when was the most recent History for that attr, looking back through old baselines. Then I would MAYBE prompt on each specific attribute; or more likely just print a nice report showing recomendations and let the Admin do it mindfully manually.

Right now I've got a couple excellent attribute reporting scripts that make it easy to spot rogue attributes; but are not specifically intended to locate ones to be deleted.

[2] If you moved your Template temporarily to the Project root folder you could use the "copyAtts.dxl" script to push its attributes down to your selected target modules. I don't think the various versions of that script copy "tricky" attribute properties like Enumerated Colors.

-Louie