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

Error when specifying a subset of properties in IProcessItemService.findAllProjectAreas(peroperies, ...)

Environment RTC 5.0.2 Plain Java API
 I would like to get all project areas in a repository using IProcessItemService.findAllProjectAreas(Collection properties, IProgressMonitor monitor) , but with a subset of properties: name of the project area and its description.
Therefore I pass the following value to the first parameter of the above method:
Collection properties = Arrays.asList(new String[] {IProjectArea.NAME_PROPERTY_ID, IProjectArea.DESCRIPTION_DETAILS_PROPERTY_ID});

I get the following error, but I don't have any any idea what could be the reason.
Can you please help me resolve this issue?

Thanks in advance!

Exception in thread "main" java.lang.IllegalArgumentException: Invalid property name list. The property list includes the name "descriptionDetails" but that is not a valid property for the com.ibm.team.process#ProjectArea item type.
at com.ibm.team.repository.service.internal.RepositoryItemService.assertValidPropertyNames(RepositoryItemService.java:1767)
at com.ibm.team.repository.service.internal.RepositoryItemService.assertValidPropertyNames(RepositoryItemService.java:1756)
at com.ibm.team.repository.service.internal.RepositoryItemService.fetchItemsPermissionAware(RepositoryItemService.java:625)

0 votes



One answer

Permanent link
 I think the error message says it all: 

Exception in thread "main" java.lang.IllegalArgumentException: Invalid property name list. 

The property list includes the name "descriptionDetails" but that is not a valid property for the com.ibm.team.process#ProjectArea item type.

I don't have an idea what would be allowed, but apparently what you try is not. It might be a good idea to search for other examples of the call and maybe looking at the IProjectArea for more information about its property.

0 votes

Comments

I have been searching for a description of properties that can be passed to the method "findAllProjectAreas(Collection,...)", but unfortunately without any success (nether in the Plain Java documentation nor in the RTC source code). I couldn't manage to find any examples in internet, as well. I expected that all properties of the kind IProjectArea.<property name>_PROPERTY_ID (all properties such as IProjectArea.DESCRIPTION_DETAILS_PROPERTY_ID) should work, but only some of them do. The example does not. I assume that I am missing something, but I have not managed to identify it up to that moment.

Regards,
 Krasimir Malchev

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
× 10,941

Question asked: Nov 22 '16, 4:12 a.m.

Question was seen: 1,563 times

Last updated: Nov 23 '16, 4:23 a.m.

Confirmation Cancel Confirm