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

RTC: bold text in script based default values

Hi there,

long time no see but I found the way back ;)

I have on question regarding default Values in RTC.
We would like to do a similar thing as it is configured on jazz.net:
When raising a defect a pre-filled description should appear.

If I use a simple default value (Multi-Line HTML Provider) I am able to use bold and italic text frames to structure my text. This is really helpful but the problem is that If i change the description attribute of type defect to use this default value - all work item types are using this default value ... this seems to be based on the fact that this information is stored within the attribute itself (which is the same in all WI types).

So the only way seems to be using a javascript (as it is done at jazz.net, too).
Using a script snipped I am not able to use bold and italic text frames ...
The HTML code will be only written "as is" within the description field.

So - my question:
How can I use bold and italic text when using script-based default values?

My current snipped looks this:


The behaviour within the browser when creating a new defect is:


Greetings,
Simon

0 votes



One answer

Permanent link
My finding so far is, that the script returns a string, which the internal API converts using XMLString.createFromPlainText(string) which escapes all control characters.

I have not found a way in a script to use something similar to XMLString.createFromXMLText() and return the XMLString to preserve the control characters.

I believe it is impossible to generate proper HTML/XML fro HTML attributes (including description and summary) with JavaScript. The only way to achieve creating formatting and links was by using the work item attribute type WIKI.

I would assume that a Java based value provider can use said methods, but I am not sure.

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
× 152

Question asked: Jan 12 '16, 4:03 a.m.

Question was seen: 4,131 times

Last updated: Jan 12 '16, 6:03 a.m.

Confirmation Cancel Confirm