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

Can't save work item ( Java API - Server Side )

 I have this code 


 private boolean updateParent(ISaveParameter saveParameter, List<IWorkItemHandle> childs_handle,IProgressMonitor monitor) throws TeamRepositoryException {
 
String child_update = "";
 
IWorkItem parents = (IWorkItem)saveParameter.getNewState(); 
 
IAttribute Prodd = fWorkItemCommon.findAttribute(
parents.getProjectArea(), Product_Name,
monitor);
 
 
 
 
 
for (IWorkItemHandle childs: childs_handle){
 
IWorkItem child_workitem = (IWorkItem) fWorkItemServer
.getAuditableCommon()
.resolveAuditable(childs, IWorkItem.FULL_PROFILE, monitor)
.getWorkingCopy();
 
 
Object x = childValue(parents,child_workitem,monitor);
 
child_update = child_update + " " + x .toString();
 
 
}
 
IWorkItem parent= (IWorkItem)fWorkItemServer.getAuditableCommon().resolveAuditable(parents ,IWorkItem.LARGE_PROFILE,monitor).getWorkingCopy();
parent.setValue(Prodd, child_update);
 
// Save the work item with an information that could be used to prevent
// recursive ascent.
Set<String> additionalParams = new HashSet<String>();
additionalParams
.add(UPDATE_PARENT_EXTENSION_ID);
IStatus saveStatus = fWorkItemServer.saveWorkItem3(parent, null, null,
additionalParams);
if (!saveStatus.isOK()) {
return false;
}

return true;
 
}
 
 
private Object childValue(IWorkItem parents, IWorkItem child, IProgressMonitor monitor) throws TeamRepositoryException {
 
IAttribute Prod_pre = fWorkItemCommon.findAttribute(
parents.getProjectArea(), Product_pre,
monitor);    
Object x = child.getValue(Prod_pre);
return x;
}



When I tried to run the API I got this kind of error: 

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

Question asked: Sep 07 '17, 3:22 a.m.

Question was seen: 954 times

Last updated: Sep 07 '17, 3:36 a.m.

Confirmation Cancel Confirm