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

Extended Rich Text through Server API

I'm trying to set the description of newly created work items through the server API. The description should contain rich text, such as bold text.

I'm using the method IWorkItem.setDescription(...) to do so, and this is essentially my code:

IWorkItem wi = ... ;
String description = .... ;
wi.setDescription(XMLString.createFromXMLText(description));

I get the following error message:
"The work item with the ID xxx 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.

This means that the Web UI uses different API to handle rich text?!
How can I accomplish this with the server API?

I'm using RTC 6.0.6, Liberty server

0 votes


Accepted answer

Permanent link

 I've changed the markup to use bold text (b HTML tag) instead of underline (u HTML tag), and it worked.

Enabling or disabling extended rich text did not make a difference.

I think the error message emitted by RTC is not 100% accurate.

What confused me the most, though, is that I was using the server-side API (inside an IOperationParticipant), and I assumed that calls by the web client would go through the same API once it reaches the server, but apparently that is not the case.

Ralph Schoon selected this answer as the correct answer

0 votes

Comments

The Web UI uses REST interfaces to communicate with the server. This is not necessarily the same API. The fact that the operation participant is executed regardless if this is from the Web UI or not, does not really matter. It is the same API as a follow up action, but the API used to change values might not be the same API. My 2 cents. 

BTW, thanks for sharing. It is appreciated if you answer your own questions, if you find a solution.  


One other answer

Permanent link

 I think, I have not played with that using the  API, this is related to the new rich text content that can be enabled for RTC. It appears that the client API can not set this information. You will have to look how the Web UI does this. An alternative could be to use a normal text attribute for the automation and let the description to be used by users in the Web UI.

0 votes

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
× 10,935
× 411
× 233
× 58

Question asked: Dec 11 '18, 3:44 a.m.

Question was seen: 3,176 times

Last updated: Dec 18 '18, 5:01 a.m.

Confirmation Cancel Confirm