Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Showing the date when an object was deleted
Topic Summary: How to list deleted objects sorted by the date they were deleted
Created On: 1-Dec-2006 15:56
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 1-Dec-2006 15:56
User is offline View Users Profile Print this message


Wilson David

Posts: 2
Joined: 30-Nov-2006

I have the following script:

Object o
bool b
int i=0
showDeletedObjects true
for o in current Module do
{
b = isDeleted o
if (b == true)
accept(o)
else reject(o)
}
filtering on

Which finds objects in a module that are deleted.  I would like to further filter these objects to show the date these objects were deleted.  I assume I need to use the object history property for deletions - something like:
 

History h
for h in (current Module) do
{
if ((h.type == deleteObject)   ...etc,
 

But I don not know how to code this.  Can anyone offer a suggestion?  Thank you.

Dave 

Report this to a Moderator Report this to a Moderator
 1-Dec-2006 18:35
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

First off: all my filters do it the way you do it: examine each object and accept or reject it. Understand, however, that these manual filters cannot be saved in a view. To save in a view you have to "set" some sort of "Filter" variable which describes the conditions for filtering but does NOT loop through objects.

I would add 'entire' to your loop: for o in entire(current Module) do. That gets all objects regardless of the current display state.

Your snippette should find Delete history for all objects so long as they were deleted after the most recent baseline. To find history in Baselines you have to open the baselines, get a module handle for that, then search them. That gets a little sticky.

You can find the history for a particular object with "for h in o do" loop. Look for 'deleteObject'. If you find it then retrieve the h.date. I'd do it like the attached.

- Louie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.