It's all about the answers!

Ask a question

How do I change the creation date of a workitem?

David Coles (111) | asked Oct 22 '12, 8:03 p.m.

How can I change the creation date of an existing work item?
We've migrated a lot of 'work' from a previous system in to RTC but all of the creation dates of the new WorkItems are from the day when the auto migration occurred. We would like to change these to be the date when the original work was created but I can't see a way to change things.
I can query the work item using the java api and then call setCreationDate on the IWorkItem object but it doesn't seem to change the date and it's marked as 'Internal' in the api docs. Should this work? is there a way change the creation date?


2 answers

permanent link
Ralph Schoon (61.8k33643) | answered Oct 23 '12, 3:33 a.m.
Hi David,

I believe you can do that only using an API. You can use the plain java Client Libraries to do that.
Using the Plain Java Client Libraries you could use:

I should probably create a better entry, but some hints on how to modify a work item can be found in this post: .  You can do the modification in the operation execute instead of uploading the attachment. For example

protected void execute(WorkItemWorkingCopy workingCopy, IProgressMonitor monitor) throws TeamRepositoryException {
try {
IWorkItem workitem = workingCopy.getWorkItem();
} catch (IOException e) { e.printStackTrace(); }

permanent link
Arun Batra (14612326) | answered Oct 23 '12, 5:39 a.m.
One option to do so would be to make the creation date attribute as editable from the process configuration source. (as it cannnot be done from the editor presentations directly.) The next step would be to synchronize all workitems so that the change is updated. Then one could go ahead and change the creation date of the synchronized workitems.

Hope it helps...

praveen patidar commented Dec 02 '12, 11:53 p.m.

Just FYI...
One other way is to Export the workitems with Creation date and update the creation date and import them again. Its simple and required less technical effort.

Your answer

Register or to post your answer.