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

Difference between fetchCompleteItem and fetchCompleteState methods of ItemManager class ?

I am getting permission denied exception when I tried to fetch complete state by passing workitem handle using fetchCompleteState where as fetchCompleteItem is returning workitem with out giving any error.

My implementation is like first I will get all states(History) of workitem by using fetchAllStateHandles method of ItemManager class. Then I will iterate over the list I got from fetchAllStateHandles and get the complete workitem of each handle. It was working fine with JAZZ server 3.X but it is giving error for some workitems in JAZZ server 4.x(this is not the case with all workitems some workitems it is working fine and some it is giving error).

For EX: I have a workitem xxx and when fetch all state handles I am getting 12 state handles among them for 6 states it is fetching the complete state and for remaining states it is illegat read access.

When I use fetchCompleteStateAwareOfPermisson method of ItemManger, it is returning a list. In list it is clearly showing accesdenied for six workitem handle and remaining are present retrieved list.

I have complete access rights. I can normally view the workitem and it's history on the browser and RTC client editor.

0 votes



One answer

Permanent link
As far as I can tell fetchCompleteItem() returns the latest state of a work item. If you pass the work item handle to fetchCompleteState() it returns the same.

If you use fetchAllStateHandles() you get all historical and the current state handles, if you fetch the states you get - as far as I can tell - the states of the work item in its history.

If you fetch permission aware you will get the items back where you have permission to read and typically the handles for items that can not be found or you don't have permission to in different sets. If you get permission denied items back you don't have permission, regardless if you have permission to read the current state, I think. 

0 votes

Comments

Thanks for your quick reply.

But I have complete rights and I can view the workitems with all kinds of restirctions in browser and RTC client. This is the case only when I try to fetch the complete state programmatically.

FYI inforamtion this is the problem I am facing since we upgraded jazz server to 4.x from 3.x. Is it any thing related to server?

Please let me know if you need more information..

I can't help you further. The fact that you can see the work item only says that you can fetch the last state. It is simply the same as if you used fetchCompleteItem().

I am not sure why you want to fetch the historical states. But if you do and you don't have access to some of them, you don't have access, whatever the reason for that might be. Reasons might be team permissions you did not have back then. I don't know enough about the internals to answer why that could be the case.

If you think that it is an issue with the upgrade, I would suggest to open a work item or a PMR. However, I would suggest to use the PermissionAware fetch,because you can't assume you have full access to everything.

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,937

Question asked: Nov 29 '12, 4:44 a.m.

Question was seen: 5,135 times

Last updated: Nov 30 '12, 6:11 a.m.

Confirmation Cancel Confirm