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

How to fetch 'Created date' attribute of work item in RTC using java

 Hi Team,


I want to retrieve the "created date" attribute value for each created work item using java API in RTC 6.0.6.1 .
Can you please suggest me.


0 votes



2 answers

Permanent link

 https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/ explains how to work with work item attributes, how to find the ID and what to do with it.

There are internal constants as well for the ID's e.g. IWorkItem.CREATION_DATE_PROPERTY

0 votes

Comments

 Hi ,


When I am trying to fetch the value of the attribute described above, I am getting below error

"Exception in thread "main" java.lang.IllegalStateException: Attempting to get unset feature: CreationDate"

Can you please assist on the same?

Won't speculate on invisible code. Use "creationDate" as attribute ID.

Hi Ralph,

Thanks for your response.
I have been trying to get creationDate using
IAttribute creationDate=workItemClient.findAttribute(projectArea,IWorkItem.CREATION_DATE_PROPERTY, monitor);
System.out.println(workItem.getValue(creationDate));

Still getting exception as Attempting to get unset feature: CreationDate
Please assist.


Permanent link

 This code works for me:


0 votes

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
× 7,512
× 1,342

Question asked: Feb 22 '22, 5:43 a.m.

Question was seen: 919 times

Last updated: Feb 23 '22, 2:48 a.m.

Confirmation Cancel Confirm