![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Deleting baselines... Topic Summary: Created On: 1-Jun-2006 12:17 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: !! Thanks Louie, that did the trick. Thanks to everyone else who put there 2 cents in too (especially Hubertus) Bob. | |
![]() |
|
Does anyone know of a clever way to delete all but the LAST baseline in all modules from an entire DOORS database? I'd rather not have to do this manually 'cus it'll take me months! |
|
![]() |
|
![]() |
|
Hi Bob,
if you don't mind that the basline Id remains try the following: copy a folder/project and paste it else where in the DB. The baselines are not copied! It is the first time, that I would call it a feature, else it is a bug for me, that baselines get lost by copy+paste. :-) Just an idea, but in this case you loose all including the LAST baseline... Regards Hubertus Edited: 1-Jun-2006 at 12:26 by Hubertus Grobbel |
|
![]() |
|
![]() |
|
Hi Hubertus,
Thanks for the info, but we do need to keep that last baseline. I gorra horrible feeling that I'd need dxl to do exactly what I need, but a dxl programmer I'm not. Thanks, Bob. |
|
![]() |
|
![]() |
|
Hi Bob,
attached you find a piece of code. This does nothing unless you comment out line 32 ...delete ... Only a printout is done to show what would be done. Be sure to test it very carefully in a safe folder at first. Afterwards use the second main loop to apply to whole db(!) and enable deletion of baselines in you db-policy if not yet enabled and disable afterwards. This code is delivered as is without any warranty! This cannot be stated more clear at this point. Furthermore you know community means give and take :-) Regards Hubertus Edited: 1-Jun-2006 at 16:02 by Hubertus Grobbel |
|
![]() |
|
![]() |
|
Just a nit-pick. I notice you are cleverly finding all the Baselines and storing them in a Skip list; where the "key" is a integer sequencer. That's good practice; do it also for all sorts of other things like Links. That's good because [1] if a library function you call from within your loop ALSO does a baseline loop, the outer loop will get lost (DXL really bytes) [2] if you delete a baseline from within a baseline loop, the loop will also get lost (DXL really bytes).
Anyway, the Sequencer insures that you retrieve the baselines from the skip in the same order that they were inserted. Thus, you only need "for bCurr in sklBaselines do" to get them out in correct order, since this Skip loop retrieves them in KEY sorted order; integer in this case. Do you need to save(mCurrentMod) before closing it? I'd trap the delete(mCurr, bCurr) errors like this: noError() delete(mCurr, bCurr) string ErrMess = lastError() if (!null ErrMess) then baseline didn't delete... - Louie |
|
![]() |
|
![]() |
|
Hi Louie,
good point with the second delete-loop. In Germany we say, shooting with cannons on sparrows, if a solution is inadequate complex. I simply shook my libraries and out came the script :-) I am not sure whether it is necessary to save the currmod, woud not expect, but it's good to have it in mind. Also the error-trapping is a reasonable addon combined with an error output to show the admin, that the operation did not work out completely. Looking forward to the reports of Bob and his final way of doing.... Regards Hubertus |
|
![]() |
|
![]() |
|
Here in Japan we say "Don't use an axe to remove a fly from a friends head". OK, that's China and not really "here".
Here in the US we say "KISS: Keep it simple, stupid". It could have been "Hey Stupid: Keep it Simple" but "HSKIS" isn't a good acronym. Well, actually we usually drag it on and on: "The increasing capabilities of a system and are related to the inverse of the system's capabilities, and the mis-understanding of a system is related to the expential increasing of its complexity". Well, we actually say it correctly. Well, not actually "we" but more like just "me"... - Louie |
|
![]() |
|
![]() |
|
Many thanks, Hubertus, for your help, I'm sorry I didn't thank you earlier, I was away on business.
There is one problem tho... when I run this script as either dbAdmin or Administrator I get the following dxl error.... The user 'Administrator' has insufficient access rights for this operation. |
|
![]() |
|
![]() |
|
I think the module needs to be opened for "edit" not "read", and after "deleteBaselinesExceptLast" the module should be "save"d.
|
|
![]() |
|
![]() |
|
!! Thanks Louie, that did the trick.
Thanks to everyone else who put there 2 cents in too (especially Hubertus) Bob. |
|
![]() |
|
![]() |
|
Hi Bob,
thanks for your nice feedback! Regards Hubertus www.issc.de is your partner for software systems and requirements management. |
|
![]() |
Telelogic DOORS
» General Discussion
»
Deleting baselines...
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.