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

Can we edit a 'Calculated Value' attribute and make the changes stay as it is?

Hi,

This question is in continuation with my previous one.

I have a description field which is calculated based on value of an enumeration. (Code written in the previous question).
The content of description field is something like this.

Description of the Issue:
How it was found:
Steps to reproduce:

Now, I want users to enter their observation in description. System is allowing me to edit the description field.
However as soon as I save it, all the information is gone and the description field is again set to the one written above.

I know the script which I have written sets the Description field to the value I have given. But is there any way to keep that value as well as the changes done?

RTC v 6.0.2

0 votes


Accepted answer

Permanent link

HI Suchita,

The return value should include the previous your description.

Read the older description using : var old_description = workItem.getValue( WorkItemAttributes.DESCRIPTION);

Append this value to the return : return old_description + calculated_enum_val;

hope this helps.

Regards, Dinesh

Shuchita Tripathi selected this answer as the correct answer

0 votes

Comments

Thank you Dinesh. You have helped me a lot!! :)

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

Question asked: Feb 06 '17, 6:01 a.m.

Question was seen: 1,952 times

Last updated: Feb 07 '17, 3:48 a.m.

Confirmation Cancel Confirm