I've got a project that has, ahem, "evolved over some time". It contains a large number of object attributes, some of which I suspect are no longer used by any view or DXL.
Also, once I decide that I want to delete an attribute and take that step, is it instantly removed from availability in the database or is a "Save" step required in order to commit this change? Another way to ask this is, if I delete the attribute and discover that I needed it, can I just close and re-open the project (and in this way, recover the attribute and all of its data in the various objects) or do I need to explicitly restore the already-gone attribute?
(This is my first post in this forum so please be kind if I violated some cultural taboo(s).) Atlant - Wed Jul 13 09:01:01 EDT 2016 |
Re: How can I tell if an Object Attribute is used? Hi Atlant,
I fear that you have quite a problem... As you already guessed, an object attribute can be "used" in three different ways: 1. either it is used by storing information that is important for some stake holder 2. or it is used in some script 3. or it is shown in a view
For checking "1", well, no, there is no other way than opening every single module in the DB, find all attribute definitions and for each non-system-object attribute loop through every object (for o in entire(!!) m) whether at least one object has this value filled. 2. will be difficult. Scripts can be hidden in a lot of places, in Triggers, DXL attributes, DXL Layout columns, in client installations. Additionally, users can add scripts or include files to their DOORS client e.g. by setting the variable ADDINSPATH to any place on their PC or in the network, Even if you find every DXL script, it can still be that scripts are encrypted, so you might not be able to find all needed attribute names, e.g. by doing a "grep" on these files. About 3: I would say, that if an attribute does not have a value in any object, the attribute can be removed from the view. But this might not be true if you have a view which is used for an export, where someone might expect certain attributes to be at a certain column number.
Yes, when you remove an attribute from a module, you need to save the module, or you can close the module without saving. But once you saved the module, the attribute and its values will be gone forever. Going back will only be possible by restoring the complete database to a previous backup.
When we had projects like this, we usually created some scripts which collect every attribute in every module in every project, sometimes combined with a number of how many objects have this attribute filled, and summarize this information in Excel or something similar. Then we gave this list to all key users of the projects and let them decide whether these attributes are still needed. Chances are high that these key users know whether attributes are needed in a script or in an important report. But you can never be 100% sure....
Regards,
|
Re: How can I tell if an Object Attribute is used? Mike.Scharnow - Wed Jul 13 09:38:18 EDT 2016 Hi Atlant,
I fear that you have quite a problem... As you already guessed, an object attribute can be "used" in three different ways: 1. either it is used by storing information that is important for some stake holder 2. or it is used in some script 3. or it is shown in a view
For checking "1", well, no, there is no other way than opening every single module in the DB, find all attribute definitions and for each non-system-object attribute loop through every object (for o in entire(!!) m) whether at least one object has this value filled. 2. will be difficult. Scripts can be hidden in a lot of places, in Triggers, DXL attributes, DXL Layout columns, in client installations. Additionally, users can add scripts or include files to their DOORS client e.g. by setting the variable ADDINSPATH to any place on their PC or in the network, Even if you find every DXL script, it can still be that scripts are encrypted, so you might not be able to find all needed attribute names, e.g. by doing a "grep" on these files. About 3: I would say, that if an attribute does not have a value in any object, the attribute can be removed from the view. But this might not be true if you have a view which is used for an export, where someone might expect certain attributes to be at a certain column number.
Yes, when you remove an attribute from a module, you need to save the module, or you can close the module without saving. But once you saved the module, the attribute and its values will be gone forever. Going back will only be possible by restoring the complete database to a previous backup.
When we had projects like this, we usually created some scripts which collect every attribute in every module in every project, sometimes combined with a number of how many objects have this attribute filled, and summarize this information in Excel or something similar. Then we gave this list to all key users of the projects and let them decide whether these attributes are still needed. Chances are high that these key users know whether attributes are needed in a script or in an important report. But you can never be 100% sure....
Regards,
Mike:
Thanks!
As you might guess, I'm the inheritor of this particular module so I'm as close to "the key user" as we get, but no one handed me the secret decoder ring for this module. There's now Layout DXL covering the uses that I was aware of and I'm pretty sure the scope for the attribute in question can't extend outside of the module so I guess I'll just 1) delete the attribute, 2) switch to every view, and 3) scroll through every view and if nothing goes badly, I'll assume it the attribute really was unused. It's good to know that I can always revert by closing-without-saving. |
Re: How can I tell if an Object Attribute is used? Atlant - Wed Jul 13 10:43:46 EDT 2016 Mike:
Thanks!
As you might guess, I'm the inheritor of this particular module so I'm as close to "the key user" as we get, but no one handed me the secret decoder ring for this module. There's now Layout DXL covering the uses that I was aware of and I'm pretty sure the scope for the attribute in question can't extend outside of the module so I guess I'll just 1) delete the attribute, 2) switch to every view, and 3) scroll through every view and if nothing goes badly, I'll assume it the attribute really was unused. It's good to know that I can always revert by closing-without-saving. Instead of deleting the attribute just change the name by adding a prefix -- You will find out quickly if you have to change the name back with in the next day, month, year etc. |
Re: How can I tell if an Object Attribute is used? DOORSHAM - Wed Jul 13 12:19:10 EDT 2016 Instead of deleting the attribute just change the name by adding a prefix -- You will find out quickly if you have to change the name back with in the next day, month, year etc. Great idea -- thanks! (Further background) I asked our DOORS admin whether we have any over-arching documents describing how we use user-defined attributes in our world but no such document exists. I think Alberich left the company and took his secret decoder ring with him. ;-) |
Re: How can I tell if an Object Attribute is used? Atlant - Wed Jul 13 13:06:42 EDT 2016 Great idea -- thanks! (Further background) I asked our DOORS admin whether we have any over-arching documents describing how we use user-defined attributes in our world but no such document exists. I think Alberich left the company and took his secret decoder ring with him. ;-) Send him more money and get him back. |
Re: How can I tell if an Object Attribute is used? Well I see problem quite often and as has already been mentioned can mine this information using DXL, if you happen to have someone who knows how to write DXL then I recommend a talk I gave a few years back (available as a free webcast) which basically explains the methodology we used (and still use to this day) to answer the exact question you are asking and then clean the database of the unnecessary attributes. http://321gang.com/2012/02/09/managing-doors-the-administrators-toolbox/ |
Re: How can I tell if an Object Attribute is used? DOORSWizard - Wed Jul 13 17:03:53 EDT 2016 Well I see problem quite often and as has already been mentioned can mine this information using DXL, if you happen to have someone who knows how to write DXL then I recommend a talk I gave a few years back (available as a free webcast) which basically explains the methodology we used (and still use to this day) to answer the exact question you are asking and then clean the database of the unnecessary attributes. http://321gang.com/2012/02/09/managing-doors-the-administrators-toolbox/
Thanks! I've actually been known to write some DXL and considered applying it, but my problem seemed relatively small. For any "more-general" clean-up, I'll definitely take your advice. |
Re: How can I tell if an Object Attribute is used? Remember attributes are saved within Baselines (at least in DOORS 9 - verify other versions). - Deleted attributes and their values will remain in previous baselines - this will help you cleanup, move on and sleep at night. Would suggest the following: Baseline your modules Run scripts to (have some - not to bad to write) document views contents ( attributes, attached dxl can be saved, includes etc) Run scripts to document all attributes, types, history settings, default values, attached dxl etc SAVE OUTPUT TO DOORS MODULE(s), Document everything - then it will be easier to get back if you have too. Cleanup, delete attributes, views etc - listen for the screaming ... Also note an attribute with a Default setting is "set" but still may be obsolete. Good Luck! |
Re: How can I tell if an Object Attribute is used? Atlant - Thu Jul 14 06:35:08 EDT 2016
Thanks! I've actually been known to write some DXL and considered applying it, but my problem seemed relatively small. For any "more-general" clean-up, I'll definitely take your advice. You can make suggestions in the round file under your desk |
Re: How can I tell if an Object Attribute is used? Atlant - Thu Jul 14 06:35:08 EDT 2016
Thanks! I've actually been known to write some DXL and considered applying it, but my problem seemed relatively small. For any "more-general" clean-up, I'll definitely take your advice. Inside the DOORS client if you go under Help > DOORS on the Web > DOORS Support it should place you on a page you can ask for improvements. At this point in time I think this type of request would be outside the limits of what DOORS 9.x architecture can handle so your better bet would be to see this type of functionality in DOORS Next Generation (my 2c). |