Error while creating workitems with Rich text via a widget
Sneha Rao (26●1)
| asked Jul 10 '19, 7:33 a.m.
edited Jul 11 '19, 6:47 a.m. by Ralph Schoon (63.3k●3●36●46) Hello all,
We have a widget that creates a copy of selected work items. After we switched on the Rich Text Feature, we are facing the following error for the work items having Rich Text description,
Could not save work item : CRRTC0300E: The work item with the ID <id> cannot be saved because this client version cannot modify extended rich text content in the attributes '[Description]'. To modify an attribute that contains extended rich text use the web client.
Is it so that the Rich Text cannot be added or modified by any client except via the Web browser itself?
We are here using AJAX to call the REST service provided by RTC(which is almost similar to the call made by the web). Below is the snippet :
$.ajax({ method : 'POST',
url : 'https://localhost:9443/ccm/service/com.ibm.team.workitem.common.internal.rest.IWorkItemRestService/workItem2',
headers : {
'Accept' : 'text/json',
'Content-Type' : 'application/x-www-form-urlencoded; charset=utf-8'
}
data : this.bodyData, // The bodydata contains the headers like additional save parameters eg. - com.ibm.team.workitem.common.internal.updateExtendedRichText
paId : this.paId,
newWiId : this.newWiId,
success : function(data) {
// Publish the result.
},
error : function() {
// Error Handling
}
});
I will be glad to receive some insights here.
Thanks
|
Accepted answer
Sneha Rao (26●1)
| answered Jul 11 '19, 6:16 a.m.
edited Jul 11 '19, 7:02 a.m. by Ralph Schoon (63.3k●3●36●46)
The additional save parameter - com.ibm.team.workitem.common.internal.updateExtendedRichText2 must be used (instead of com.ibm.team.workitem.common.internal.updateExtendedRichText). The number 2 at the end is important.
Thanks to Ralph Schoon and his team for the solution.
Ralph Schoon selected this answer as the correct answer
Comments
Ralph Schoon
commented Jul 11 '19, 7:19 a.m.
| edited Jul 11 '19, 7:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
It is possible to pass additional save parameters in the request body.
Pass
additionalSaveParameters: com.ibm.team.workitem.common.internal.updateExtendedRichText2
To update extended rich text. (the 2 most likely is the result of a first test in CLM 4.0.3)
When creating links, pass
additionalSaveParameters: com.ibm.team.workitem.common.internal.updateBacklinks
to get the back links created.
When Enable extended rich text presentation is enabled, it is possible to use more Rich Text capabilities such as colors and horizontal lines.
This is only available in the Web Client. If an attribute has Rich text annotations by default it is prevented from being saved by the RTC Eclipse client.
When trying to save a modified attribute with rich text content the error above happens. This is also true when using the RTC SDK or Java API.
Using the additional save parameter allows to successfully change changed rich text. This is important for automation that is supposed to copy rich text data between work items.
Note, that it is also possible to mess up rich text attributes doing this.
|
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.