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

Rational Team Concert - Calculated Value - Insert link in a html field

Hi everybody.
I want to know if it's possible to insert a link in a HTML custom field from a script based calculated value.
This links it's constructed in the script dinamically with other values in the form.
We have installed RTC 4.0.3.
Thanks a lot.

0 votes



2 answers

Permanent link
Yes, HTML attributes are supported when using JavaScript. It is basically filled with a string. See https://jazz.net/wiki/bin/view/Main/AttributeCustomization and https://jazz.net/library/article/1093 (Lab 4 and 5) for some hints.

1 vote

Comments

To figure the format for HTML links I would export existing data with a link and look at how it is represented. I have not tried that with HTML myself, as far as I remember. The format for a wiki type attribute can be found in Lab 5 of the workshop above.

Thanks Ralph.

The thing with what we waht to do is that with the script we are returning something like this:
<a href="http://www.google.com">Google</a>
And when we save the Work Item the field value instead of showing Google is showing <a href="http://www.google.com">Google</a> with the complete html.

My suggestion would be to use the lab 5 JavaScript 'spy' tool to look at what is available in a HTML field with a link and use that syntax for you own script. I can only provide an example for Wiki attribute types and did so in the Lab 5.

1 vote


Permanent link
I have looked into that again recently and here is the catch.
When using the JavaScript API, the provider returns a string. When returning a string, all XML characters are escaped. So it is essentially not possible to create a link in any HTML attribute, including the description.

In the Java API, it is possible to use an XMLString to create the content from XML, which can contain the HTML tags for a link and set that, but it is not possible from JavaScript.

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
× 6,130

Question asked: Mar 04 '14, 10:51 p.m.

Question was seen: 5,365 times

Last updated: Jan 05 '16, 7:06 a.m.

Confirmation Cancel Confirm