It's all about the answers!

Ask a question

RTC Serverside plugin error while copying attribute from one workitem to other workitem


0
1
Govindaraj Ponnusamy (116) | asked Jun 10 '16, 5:48 a.m.

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



permanent link
Govindaraj Ponnusamy (116) | answered Jun 13 '16, 4:56 a.m.
Hi Ralph,

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.


permanent link
Govindaraj Ponnusamy (116) | answered Jun 13 '16, 1:04 a.m.

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.


Comments
Ralph Schoon commented Jun 13 '16, 2:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

com.ibm.team.repository.common.internal.ImmutablePropertyException says either the work item itself is immutable or a property (attribute is). If you can't provide more details, you won't get more help.


permanent link
Ralph Schoon (63.1k33646) | answered Jun 10 '16, 6:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You need a workingcopy. See https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/

Your answer


Register or 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.