It's all about the answers!

Ask a question

Resource last-modified timestamp


0
1
Srimanth Gunturi (206125) | asked May 15 '09, 1:51 p.m.
JAZZ DEVELOPER
retagged Feb 07 '13, 9:48 a.m. by SEC Servizi (97123559)
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.

6 answers



permanent link
SEC Servizi (97123559) | answered Feb 15 '13, 4:36 a.m.
edited Feb 15 '13, 4:39 a.m.
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. :)

permanent link
SEC Servizi (97123559) | answered Feb 07 '13, 9:24 a.m.
edited Feb 07 '13, 9:25 a.m.
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.

permanent link
Srimanth Gunturi (206125) | answered May 20 '09, 9:39 a.m.
JAZZ DEVELOPER
Thanks Michael,

https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&amp;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 &quot;real last-modified&quot;. 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&gt;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.

permanent link
Michael Valenta (3.7k3) | answered May 20 '09, 9:03 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
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 &quot;real last-modified&quot;. 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&gt;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.

permanent link
Srimanth Gunturi (206125) | answered May 19 '09, 11:01 a.m.
JAZZ DEVELOPER
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 &quot;real last-modified&quot;. 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&gt;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.

permanent link
Michael Valenta (3.7k3) | answered May 19 '09, 9:50 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Sri,

What do you mean by &quot;real last-modified&quot;. 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&gt;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.

Your answer


Register or 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.