![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: How to check if prefix already exists? Topic Summary: Created On: 29-Nov-2007 12:40 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
We would like to be sure that each module created in the repository has a unique prefix.
Anybody knows a solution for this? For example a trigger starting a DXL script when a new module gets created? Kind regards, Mark |
|
![]() |
|
![]() |
|
The prefix is a module level attribute. You can access it easily. To save time, it might be best to keep a file out on your network somewhere with all the different prefixes. Your tool can read from it to check if the one you want is already used. Then append it when you want to set your new unique prefix.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
If you intend Prefixes to be unique then no doubt you want Module Names to be unique; at least within the same project. It would seem to be a bit of a bother to do that dynamically as new modules are created; and that method would get pretty clumsy if you created new modules with Restore, Rejoin, click-and-drag, or copy-and-paste.
I'd be tempted to have an on-demand script that checks all modules in the project and reports those with duplicate names or Prefixes. Attached works tolerably. - Louie |
|
![]() |
|
![]() |
|
One (really odd ;-) idea: module ID is unique in the database, each module could in principle have it's uniqueID as prefix. Of course this leads to prefixes as "000053ac" or such, but they would be unique.
------------------------- Pekka.Makinen@softqa.fi SoftQA Oy -http://www.softqa.fi/ |
|
![]() |
|
![]() |
|
Louie I was thinking a tool that you run from a new module, you type a Prefix into a text field, and then click a button to check if its already used. If not, it returns a dialog saying its available and asks if you want to assign it as the module prefix. It so, it tells you it's already taken.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Louie I was thinking a tool that you run from a new module, you type a Prefix into a text field, and then click a button to check if its already used. If not, it returns a dialog saying its available and asks if you want to assign it as the module prefix. It so, it tells you it's already taken. Yes, that would be great! In this way you have the freedom to use a meaningful prefix for a module, without having to worry if it already exists. Otherwise we need to introduce all kind of rules about how a prefix must look like. This together with a module-prefix overview would even be better. |
|
![]() |
|
![]() |
|
Well the problem with it Mark depends on the version of DOORS you're running. If you're running 8.1 or prior, you can't get info on Modules without opening them. So that means for every module in the database, you'd have to open them to check the prefix. For 8.2 and 8.3, you can get the info without opening the module I believe. So it'd be far faster.
I might see about coding this up at home. Try to make it work for both new and older versions. Unless you already have. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Such a tool should no doubt have the 'current project' as the scope. 'In the database' seems hopelessly unrealistic unless you have one database for each different project ..err.. I mean each different Program.
If you intend unique module Prefixes in the project then it seems you should have unique module names in the project as well; where the Prefix is simply the module name with an underscore suffix. This way, given an identifier reference, you can quickly and uniquely identify the module and the object. With this scheme, the Project admin decides the module names and the prefixes, not the person creating the module. You could also perhaps have a policy where Prefixes that start or end with a specific string do not need to be unique. Thus the 'unique' requirement applies to 'official' modules such as Requirement module, Verification modules etc. You can modify my code, since the g_skpPrefixes contains all the prefixes of modules in the project. When you get the suggested one you can search for it in the skip. - Louie |
|
![]() |
|
![]() |
|
You could create a module at the top level of the database to contain prefixes (one object per prefix, store prefix in the object text), then create an open module trigger to consult that module and compare the current prefix with the stored ones. At lease that way you could generate a warning at open time that this module is a duplicate.
------------------------- Andrew Tagg Thales Air Systems, Melbourne Australia. andrew.tagg@thalesatm.com |
|
![]() |
|
![]() |
|
In this case, I would rather use some Configuration File inside confSystem area than a specific module.
And define a persisent trigger on "Prefix" pre-change event, to check the file, then append it. A good nice-to-have would be a loop like Louie's one to overwrite the list once a week with actual Prefix (to manage removals). |
|
![]() |
|
![]() |
|
If you intend unique module Prefixes in the project then it seems you should have unique module names in the project as well; where the Prefix is simply the module name with an underscore suffix. This way, given an identifier reference, you can quickly and uniquely identify the module and the object. With this scheme, the Project admin decides the module names and the prefixes, not the person creating the module. - Louie I'm not sure if I need unique module names. Okay, would be better, but not necessary. When prefix is unique, one can always be sure to be in the correct module, although it may require some searching. Therefore we do have some simple prefix rules to make the search more easy: [SPEC LEVEL]-[MODULE NAME ABREVIATION]: To avoid module names becoming to long. I'm not so handy with scripts. I'll try to adapt it to our needs whenever I can spend a day or so. Thanks for the example. Kind regards, Mark |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
How to check if prefix already exists?
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.