How to display attribute value in work item editor.
Hi All,
I am using setValue(IAttribute attribute, Object value) method to set value of attribute of work item. Value is set to attribute. I verified it using getValue(IAttribute attribute) method but it is not displayed in work item editor. I am creating operation participant for work item save operation. When work item is saved i am expecting to see value of attribute as set using setValue method, but nothing is displayed in work item editor in the text field of attribute. |
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Jul 16 '15, 8:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
If you talk abut the server side Java API to set the value of an attribute in an operation participant, please note that just doing set value does not trigger any work item save operation at all.
You have to save the work item in the operation participant if you want to change its value. Please also note, that if you save a work item in a participant for work item save. If you don't take precaution this will trigger your participant again and..... the server will die in a recursive call crash. See https://rsjazz.wordpress.com/?s=participant for several examples you should look at to get started. See https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/ in case you haven't already. Comments
vikrant kamble
commented Jul 16 '15, 9:43 a.m.
I am using server side java API to set value of an attribute
Yes, because you don't save the work item after setting the value. My best advise is to actually ready my answer and then read the related blog posts, because they explain all that. That is the reason that I do them:
So see https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ and https://rsjazz.wordpress.com/?s=participant
You will also need to get a workingcopy for the work item, because if you try to save this workmitem you will get an Exception saying the work item is immutable. Again explained in https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ |
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.