It's all about the answers!

Ask a question

Problem in retrieving creator and creation date attributes


Abhishek Minde (7121912) | asked Jul 28 '09, 8:26 p.m.
Hi,

I am trying to retrieve the creator and creation date from a work item. Although, these parameters are set, I am getting the following exception upon getCreator() method call,
java.lang.IllegalStateException: Attempting to get unset feature: Creator


Is there anything I am missing that is necessary to access these fields. I am able to fetch owner and other attributes from a workitem.

Any kind of help is appreciated.

Thanks,
Abhishek

2 answers



permanent link
Patrick Streule (4.9k21) | answered Jul 29 '09, 5:41 a.m.
JAZZ DEVELOPER
I am trying to retrieve the creator and creation date from a work
item. Although, these parameters are set, I am getting the following
exception upon getCreator() method call,
java.lang.IllegalStateException: Attempting to get
unset feature: Creator


Is there anything I am missing that is necessary to access these
fields. I am able to fetch owner and other attributes from a
workitem.

You have to make sure that the work item is resolved with a profile that
contains the attributes, otherwise the exception you are seeing will be
thrown when accessing the attribute values.

Use e.g.

auditableClient.resolveAuditable(handle, IWorkItem.FULL_PROFILE, monitor)

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Abhishek Minde (7121912) | answered Jul 29 '09, 2:32 p.m.
Thanks Patrick.

I was using SMALL profile. Changing it to FULL profile worked.

Thanks for your input.

I am trying to retrieve the creator and creation date from a work
item. Although, these parameters are set, I am getting the following
exception upon getCreator() method call,
java.lang.IllegalStateException: Attempting to get
unset feature: Creator


Is there anything I am missing that is necessary to access these
fields. I am able to fetch owner and other attributes from a
workitem.

You have to make sure that the work item is resolved with a profile that
contains the attributes, otherwise the exception you are seeing will be
thrown when accessing the attribute values.

Use e.g.

auditableClient.resolveAuditable(handle, IWorkItem.FULL_PROFILE, monitor)

--
Regards,
Patrick
Jazz Work Item Team

Your answer


Register or to post your answer.