It's all about the answers!

Ask a question

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


Shuchita Tripathi (31436595) | asked Feb 06 '17, 6:01 a.m.

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

Accepted answer


permanent link
Dinesh Kumar B (4.1k413) | answered Feb 06 '17, 6:11 a.m.
JAZZ DEVELOPER
edited Feb 06 '17, 6:13 a.m.

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

Comments
Shuchita Tripathi commented Feb 07 '17, 3:48 a.m.

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

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.