It's all about the answers!

Ask a question

How to change the creation date of an existing snapshot?


SEC Servizi (94622244) | asked Jul 16 '14, 9:24 a.m.
Is ti possible to change the creation date of an existing snapshot?
ITeamRepository repo = ...
IBaselineSet snapshot = ...
BaselineSet workingCopy = (BaselineSet) snapshot.getWorkingCopy();
workingCopy.setCreationDate(timestamp);
IScmClient scmClient = (IScmClient) repo.getClientLibrary(IScmClient.class);     // Anything like this?
scmClient.save(workingCopy, null);
Once the working copy has been updated, how can we save the item? We can't find any SCM client library...
We are going to create a lot of snapshot programmatically (from a software migration), but we need to maintain an original date, not the baselineset creation timestamp...
Thanks in advance.

Accepted answer


permanent link
Andrew Niefer (6785) | answered Jul 16 '14, 10:12 a.m.
JAZZ DEVELOPER
There is nothing on the client side which will allow you to save modifications to items like this.

Generally speaking, only server side code in the SCM component will be able to modify SCM items.  There is no API to modify the creation date of a snapshot.

Sorry I don't have any suggestions for you.


SEC Servizi selected this answer as the correct answer

Comments
SEC Servizi commented Jul 16 '14, 10:21 a.m. | edited Jul 16 '14, 10:23 a.m.
There is no API to modify the creation date of a snapshot.

Not even on server side code, right?


1
sam detweiler commented Jul 16 '14, 10:27 a.m.

correct.. you would be changing history


Andrew Niefer commented Jul 16 '14, 10:31 a.m.
JAZZ DEVELOPER

That is correct.  Baselines and snapshots are generally considered immutable once they are created. The only API to modify a snapshot is for changing the name and comment ( setBaselineSetName and setBaselineSetComment on IScmService).

Your answer


Register or to post your answer.