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

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.


1

0 votes



3 answers

Permanent link
You need a workingcopy. See https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/

0 votes


Permanent link

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.

0 votes

Comments

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

0 votes

Your answer

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,927

Question asked: Jun 10 '16, 5:48 a.m.

Question was seen: 2,319 times

Last updated: Jun 13 '16, 4:56 a.m.

Confirmation Cancel Confirm