It's all about the answers!

Ask a question

After adding Contributors to subscriptions getting AssertionFailedException

Girish Jangame (1116) | asked Nov 21 '17, 2:36 a.m.


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();
                    for (IContributorHandle object : contributors1) {
                         IContributor contributor = (IContributor) fItemService.fetchItem(object, null);
                         System.out.println("Names of Members: "+contributor.getName());
                         System.out.println("Names of Members: "+contributor.getUserId());

please check and let me know.

Be the first one to answer this question!

Register or to post your answer.