Not able to set the value take from the local database to store in the Description field after saving the workitem. (Follow up action Participant)
Accepted answer
My suggestion would to look into some existing examples and check how they do it. One that might be helpful is https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/
Otherwise there is not any information in your question that would hint at any possible issue.
Comments
Hello Sir,
I have looked at the code that was available at that time. Anyway, I am not inclined to debug your code. There is no error message or anything, so I stay with my suggestion to look into working examples and try to figure out what is going wrong, or you debug what happens.
This, the findWorkItemById(), does absolutely not make any sense by the way:
IWorkItem workingCopy = (IWorkItem) serverWI.findWorkItemById(work.getId(), IWorkItem.FULL_PROFILE,null).getWorkingCopy(); workingCopy.getTags2().add("Hello World RTC Extension");workingCopy.setHTMLDescription(XMLString.createFromPlainText(ftest)); serverWI.saveWorkItem3(workingCopy, null, null, this.bypass);
You already have the work item and I would again suggest to look into the example I gave, how that example gets the working copy for the current work item.
Finally, you usually get the data you need after deciding if you have to do something, so accessing the other database would be something you do last, when the information is needed.
1 vote
Thank you Sir.
No reason to "sir" me. Look at the example code.
I think the way you get the workingcopy might be the issue. Again, look at the example and read the blog.
I would remove or comment out the database code for the time being and just print the date or append something to the description, just to reduce complexity until you can change the attribute.
A common issue is that
1 vote
OK, Thank you once again.
Hello Ralph,
I explained in https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/ which ways there are to access the attributes. Depending on which attribute there are more than one way to gt the attribute ID and to get attributes.
Unfortunately the one you describe in your comment - using the project area admin in the RTC Eclipse client does not provide you with a correct ID. The id's exposed for non custom (internal) attributed there are for a different purpose and don't work for getting the IAttribute. The easiest way to find the ID, if it is not available in the IWorkItem interface is to look into the Web project area administration UI.
For the description, you can use the available getters and setters.
1 vote
Thank you, Ralph.