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

After adding Contributors to subscriptions getting AssertionFailedException

Hi,

I have used below piece of code to find the team area members and I want to add them into the subscriptions.
But after adding them it are not visible in the web as well as eclipse client in subscribers option.
If I enter the         fWorkItemServer.saveWorkItem2(WI, null, null); line at the end of below code I am getting AssertionFailedException.

I am unable to trace why its not able to add it in the workitem. I am gettting required members.

List teamAreas = projectArea.getTeamAreas();
                IWorkItem WI = (IWorkItem)fWorkItemServer.getAuditableCommon().resolveAuditable(projectAreaHandle,IWorkItem.FULL_PROFILE,monitor).getWorkingCopy();
               
                for (int i=0;i<teamAreas.size();i++) {
                    ITeamAreaHandle teamArea = (ITeamAreaHandle)teamAreas.get(i);
                    ITeamArea teamArea1 = (ITeamArea) fAuditableCommon.resolveAuditable(teamArea,
                            ItemProfile.createFullProfile(ITeamArea.ITEM_TYPE),    monitor);
                    System.out.println("Name "+ teamArea1.getName());
                    ISubscriptions subscriptions = WI.getSubscriptions();
                    contributors1=teamArea1.getMembers();
                    for (IContributorHandle object : contributors1) {
                         IContributor contributor = (IContributor) fItemService.fetchItem(object, null);
                         subscriptions.add(contributor);
                         System.out.println("Names of Members: "+contributor.getName());
                         System.out.println("Names of Members: "+contributor.getUserId());
                       
                    }


please check and let me know.

0 votes


Be the first one to answer this question!

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
× 1,221

Question asked: Nov 21 '17, 2:36 a.m.

Question was seen: 1,081 times

Last updated: Nov 21 '17, 2:36 a.m.

Confirmation Cancel Confirm