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

How to fix workItems with creationDate main field set to none, but with a correct creationDate in the History?

Right now I'm having trouble with some work items. The Creation Date field that appears in the main part of the work item is displaying a "None" value, meanwhile inside the History the first log shows the Creation Date in which the work item was created.

0 votes



2 answers

Permanent link
 one way is to set the creation date as system property date so that both the  dates I.e. on the work item and history are in sync. 

0 votes

Comments

Hi, sorry but i dont know how to set the creation date as a system property on RTC. Can you please explain a little further or direct me to a link in where i can learn how to do this?


Permanent link
            DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
            Date date = new Date();
            IWorkItem wi=client.findWorkItemById(workItemId, IWorkItem.FULL_PROFILE, monitor);
               IWorkItemWorkingCopyManager manager= client.getWorkItemWorkingCopyManager();
               manager.connect(handle, IWorkItem.FULL_PROFILE, monitor);
                wc = manager.getWorkingCopy(handle);
            wi.setCreationDate(new Timestamp(date.getTime()));
            wc.save(null);

This should update the workitem's creation date as system date.

0 votes

Comments

Thanks i will try it and see if it fixes my problem.

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
× 369

Question asked: Nov 30 '16, 12:50 p.m.

Question was seen: 3,152 times

Last updated: Dec 13 '16, 10:11 a.m.

Confirmation Cancel Confirm