RTC Serverside plugin error while copying attribute from one workitem to other workitem
RTC Serverside plugin error while copying attribute from one workitem (Task) to other workitem (Defect)
After finding the parenthandle, I'm trying to copy the attribute from task workitem to defect workitem by creating links
//defect is the child work item
IAttribute defectAttribute = fWorkItemCommon.findAttribute(
children.getProjectArea(),"defect1" , monitor);
//task is the parent workitem
IAttribute taskAttribute = fWorkItemCommon.findAttribute(prntWorkItem.getProjectArea(), "task1", monitor);
//trying to copy from Parent to child by setting the Links setParent to Task
children.setValue(defectAttribute,prntWorkItem.getValue(taskAttribute).toString());
Set<String> additionalParams = new HashSet<String>();
additionalParams
.add(IExtensionsDefinitions.UPDATE_PARENT_SUMMARY_EXTENSION_ID);
IStatus saveStatus = fWorkItemServer.saveWorkItem3(children, null, null,
additionalParams);
if (!saveStatus.isOK()) {
return false;
}
It is throwing the following error..
2016-06-10 15:06:34,134 [Default Executor-thread-330 @@ 15:06 govind <com.ibm.team.workitem.newWorkItem/Save@397a851a-83ef-44be-8eb2-2ed096fd6b04> /ccm/service/com.ibm.team.workitem.common.internal.rest.IWorkItemRestService/workItem2] ERROR com.ibm.team.process.common -
com.ibm.team.repository.common.internal.ImmutablePropertyException
Please suggest me, how to do this.
Thanks in Advanced.
Govindaraj.
3 answers
Hi Ralph,
I'm already taking the working copy of the changing workitem. But here I'm facing problem that while saving the workitem, it is taking too much time to save it and finally it is throwing error.
Scenario:
In Parent (Task work item) I'm entering some attribute value for the customized attribute ( some integer value) then I'm trying to create a Children (Defect ) and while saving the child workitem (Defect), I would like to copy the Task Custom attribute value to Child (Defect) custom attribute value. In that case it is throwing the below error.
2016-06-10 15:06:34,134 [Default Executor-thread-330 @@ 15:06 govind <com.ibm.team.workitem.newWorkItem/Save@397a851a-83ef-44be-8eb2-2ed096fd6b04> /ccm/service/com.ibm.team.workitem.common.internal.rest.IWorkItemRestService/workItem2] ERROR com.ibm.team.process.common -
com.ibm.team.repository.common.internal.ImmutablePropertyException
Please suggest me.
Thanks in Advanced.
Govindaraj.
This error occurs while trying to set the value from parent attribute to child attribute. please find the code for that
childWorkItem.setValue(defectAttribute,prntWorkItem.getValue(taskAttribute).toString());
This error com.ibm.team.repository.common.internal.ImmutablePropertyException property (attribute is) immutable. Moreover the server is also hanging and finally I got the error message of
"The server is not responding or a page navigation occurred before an operation completed.
Check that your server connection is working and that the server is operational,
then try the action again or refresh the page."
Thanks in Advanced,
Govindaraj.