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: Checking if object modified
Topic Summary:
Created On: 27-Dec-2006 14:31
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.
Answer This question was answered by Tony Goodman, on Wednesday, January 3, 2007 1:41 PM

Answer:
The following (undocumented ?) perm returns a more accurate time stamp than the "Last Modified On" attribute:

Date d = lastModifiedTime(object)

Note that this can return null, so you need to test for this and if so use the "Last Modified On" attribute instead.

Off the top of my head, what about using a configuration file to store the time your script was last run on that module?

Check this against the latModifiedTime to see if the object has changed since the script was last run.
 27-Dec-2006 14:31
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Other than checking the "Last Modified On" attribute date is there any other way to check if an object was modified before closing a module?  I'm writing a script that will be executed by a trigger that runs before the module closes.  I want to check if certain objects were modified during the session and do some processing on them.  I could check that the last modified date is today and was modified by the current user, but then what if that person reopens the module later that day but doesn't do anything to it.  Then the script will run again which I don't want it to do.



-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com

Edited: 27-Dec-2006 at 14:43 by David Pechacek
Report this to a Moderator Report this to a Moderator
 27-Dec-2006 15:09
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Comparing session may be what you want to do.
Report this to a Moderator Report this to a Moderator
 27-Dec-2006 15:22
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Do you mean compare the "Last Modified On" attribute time of day to the time of day when the session started?  Our module isn't set to save the time of day, just the date.  And even logged in as Administrator I'm not able to change that.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 27-Dec-2006 15:26
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

I don't have doors available to me right now so I can't be specific -- but you can look into the help file -- there is a session to each time a person logs on -- the session number recorded if a person makes a change.

Also you can look at the history of the object.
Report this to a Moderator Report this to a Moderator
 2-Jan-2007 10:21
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi David,

another option would be to use a pre/post save Trigger on all Objects in Module.
So you would be able to do your update immedeately after change of one Object ....

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 2-Jan-2007 14:50
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

True.  But I'm only caring if certain things are changed in the object.  And only on certain objects.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 3-Jan-2007 12:06
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Answer Answer
The following (undocumented ?) perm returns a more accurate time stamp than the "Last Modified On" attribute:

Date d = lastModifiedTime(object)

Note that this can return null, so you need to test for this and if so use the "Last Modified On" attribute instead.

Off the top of my head, what about using a configuration file to store the time your script was last run on that module?

Check this against the latModifiedTime to see if the object has changed since the script was last run.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 3-Jan-2007 13:41
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Awesome.  Thanks for the help.  I should be able to work some way of doing what I want to do out with that.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 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 1 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.