Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Resource last-modified timestamp

Hello,
When you load/unload/load, the last-modified timestamp of the Resource
is changed to the last load.. is there any place RTC maintains the real
last-modified for a resource?
Regards,
Sri.

1

0 votes



6 answers

Permanent link
Sri,

What do you mean by "real last-modified". Do you mean the time that the
file was last checked-in to the repository? If so, then there is a
timestamps associated with the IFileItem but this timestamp is only
available programmatically and is not shown anywhere in the UI. The
closest timestamp that is available from the UI is the tiemstamp on the
change set that contains the file (i.e. perform a Team>Show History on
the file).

Michael

Srimanth Gunturi wrote:
Hello,
When you load/unload/load, the last-modified timestamp of the Resource
is changed to the last load.. is there any place RTC maintains the real
last-modified for a resource?
Regards,
Sri.

0 votes


Permanent link
Hi Michael,
Suppose I created a file at 7:00am, changed it at 7:05am and delivered
it to Jazz, unloaded the component and loaded it again at 10:00am...
even though I have not changed it from 7:05am, the last-modified is
10:00am. I wanted to know if there is an easy way to get to the 7:05am.

SCM repositories like CVS preserve the last-modified timestamp on the
IResource when you checkout... RTC was setting it to when I loaded it.

Will the IFileItem contain the 7:05am?
Regards,
Sri.


Michael Valenta wrote:
Sri,

What do you mean by "real last-modified". Do you mean the time that the
file was last checked-in to the repository? If so, then there is a
timestamps associated with the IFileItem but this timestamp is only
available programmatically and is not shown anywhere in the UI. The
closest timestamp that is available from the UI is the tiemstamp on the
change set that contains the file (i.e. perform a Team>Show History on
the file).

Michael

Srimanth Gunturi wrote:
Hello,
When you load/unload/load, the last-modified timestamp of the Resource
is changed to the last load.. is there any place RTC maintains the
real last-modified for a resource?
Regards,
Sri.

0 votes


Permanent link
It should. However, as you say, it isn't set of load. You should enter a
work item for this against Source Control in the Rational Team Concert
project area of jazz.net.

Michael

Srimanth Gunturi wrote:
Hi Michael,
Suppose I created a file at 7:00am, changed it at 7:05am and delivered
it to Jazz, unloaded the component and loaded it again at 10:00am...
even though I have not changed it from 7:05am, the last-modified is
10:00am. I wanted to know if there is an easy way to get to the 7:05am.

SCM repositories like CVS preserve the last-modified timestamp on the
IResource when you checkout... RTC was setting it to when I loaded it.

Will the IFileItem contain the 7:05am?
Regards,
Sri.


Michael Valenta wrote:
Sri,

What do you mean by "real last-modified". Do you mean the time that
the file was last checked-in to the repository? If so, then there is a
timestamps associated with the IFileItem but this timestamp is only
available programmatically and is not shown anywhere in the UI. The
closest timestamp that is available from the UI is the tiemstamp on
the change set that contains the file (i.e. perform a Team>Show
History on the file).

Michael

Srimanth Gunturi wrote:
Hello,
When you load/unload/load, the last-modified timestamp of the
Resource is changed to the last load.. is there any place RTC
maintains the real last-modified for a resource?
Regards,
Sri.

0 votes


Permanent link
Thanks Michael,

https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=83718

Regards,
Sri.



Michael Valenta wrote:
It should. However, as you say, it isn't set of load. You should enter a
work item for this against Source Control in the Rational Team Concert
project area of jazz.net.

Michael

Srimanth Gunturi wrote:
Hi Michael,
Suppose I created a file at 7:00am, changed it at 7:05am and delivered
it to Jazz, unloaded the component and loaded it again at 10:00am...
even though I have not changed it from 7:05am, the last-modified is
10:00am. I wanted to know if there is an easy way to get to the 7:05am.

SCM repositories like CVS preserve the last-modified timestamp on the
IResource when you checkout... RTC was setting it to when I loaded it.

Will the IFileItem contain the 7:05am?
Regards,
Sri.


Michael Valenta wrote:
Sri,

What do you mean by "real last-modified". Do you mean the time that
the file was last checked-in to the repository? If so, then there is
a timestamps associated with the IFileItem but this timestamp is only
available programmatically and is not shown anywhere in the UI. The
closest timestamp that is available from the UI is the tiemstamp on
the change set that contains the file (i.e. perform a Team>Show
History on the file).

Michael

Srimanth Gunturi wrote:
Hello,
When you load/unload/load, the last-modified timestamp of the
Resource is changed to the last load.. is there any place RTC
maintains the real last-modified for a resource?
Regards,
Sri.

0 votes


Permanent link
Hi all,
we are trying to get the "Last Modified" date shown in the web UI:
using  a Plain Java Client. Now we get the change-set date:
IWorkspaceManager wksManager = ...
IShare share = ...
IVersionableHandle versionableH = share.getShareable().getVersionable(null);
IVersionable versionable = wksManager.versionableManager().fetchCompleteState(versionableH, null);
Date date = versionable.modified();
but it is not the same date which is retrieved from web...
Any advice?
Thanks in advance.

0 votes


Permanent link
Ok, we got it!
// ...
List<IComponentHandle> components = wksConnection.getComponentsContainingVersionable(versionableH, null);
IComponentHandle componentH = components .get(0);
IConfiguration configuration = wksConnection.configuration(componentH);
Map<String, IVersionableHandle> map = configuration.childEntries((IFolderHandle) versionableH, null);
for (String key : map.keySet()) {
IVersionable child = wksManager.versionableManager().fetchCompleteState(map.get(key), null);
if (!(child instanceof IFileItem)) {
continue;
}
Date date = ((IFileItem) child).getFileTimestamp();
}
Cheers. :)

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937
× 43
× 17

Question asked: May 15 '09, 1:51 p.m.

Question was seen: 10,393 times

Last updated: Feb 15 '13, 4:39 a.m.

Confirmation Cancel Confirm