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

How do I change the creation date of a workitem?

 Hello,

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?

Thanks
David

0 votes



2 answers

Permanent link
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:
 
workItem.setCreationDate(timestamp);

I should probably create a better entry, but some hints on how to modify a work item can be found in this post: http://rsjazz.wordpress.com/2012/08/01/uploading-attachments-to-work-items/ .  You can do the modification in the operation execute instead of uploading the attachment. For example

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

1 vote


Permanent link
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...


0 votes

Comments

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 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
× 12,031

Question asked: Oct 22 '12, 8:03 p.m.

Question was seen: 6,809 times

Last updated: Dec 02 '12, 11:53 p.m.

Confirmation Cancel Confirm