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

URLs in custom work item fields of type mediumHtml

I wanted to include a custom work item field that can have a value that is a URL to an external document. I would like the value to be a clickable link in both the RTC client and the browser interface, and of course I'd like it to look right in the browser as well.

I am aware that external URL links can be created in the "links" section of a work item quite easily - and they also get formatted correctly and are clickable in both the RTC client and browser. However I wanted a custom field so that I would be able to search work items easily - I was not sure that this could be done when using the "Related artifacts" link approach. Please correct me if I am wrong though since that would solve my problem a different way.

I'm nearly there, but I can't get a regular URL to appear properly in the web-client.

This is an example of a value I set using the RTC client:

<a>00635,070,724</a>

The problem is that the last part of the URL gets somehow modified in the browser to read:

...OpenForm&.amp.d=00635070724

which causes the query to fail.

Note the "." after the ampersand and "amp". I've tried all the different combinations of "&", "&amp" and quoting of the value in the RTC client and I always seem to get extra "." in the browser links. I am not an HTML expert but have read that the correct way to include an ampersand in a URL was to use "&". As I say, I've tried as many different ways as I can think of to get it to work and failed.

I was also interested to see that even though I set the editor presentation for the field to be "smallHtml" the RTC client didn't display the value as a formatted link - in other words it displayed the HTML source for the link - but recognized it as a link and I am able to click on it.

Any help appreciated!

0 votes



7 answers

Permanent link
Ok - I should have disable HTML in this post.

The example should read:

<a href='http://d25dbw36.mkm.can.ibm.com/wwqa%5Cwwqades.nsf/WWQADispItem?OpenForm&d=00635070724' >00635,070,724</a>

Sorry!

0 votes


Permanent link
Hi
I have created defect 70728: https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/70728 to track the issue.

Regards

Marcel
Jazz Work Item team

0 votes


Permanent link
Much appreciated Marcel.

0 votes


Permanent link
Much appreciated Marcel.


Hi all,

I have a similar problem with mediumHtml type formating on RTC2M2.
When creating a new work item with a custom mediumhtml field I get the expected formating "before" I save the workitem:


Field content:
<a href='http://www.google.com'>Googleee</a>

Preview:
Googleee (links to http://www.google.com)


But when I save the work item ... :


Field content:
<a href='http://www.google.com'>Googleee</a>

Preview:
http://www.google.com'>Googleee (links to <server public root URI>/projects/_A)


Is there something I should know about medumHTML type?

Thanks

0 votes


Permanent link
Is interesting that when I edit the mediumHtml custom field (Changing the label from Googleee to Googleeeeee for example) and click 'Preview' it works as expected again. When I save the field is wrong again.

0 votes


Permanent link
 We are able to add an hypertext link to a custom HTML field simply using:
final String html = "[a href=\"http://example.com\"]website[/a]";
wi.setValue(attribute, html);
(*) Replace [ with <.
While the Eclipse client renders the field content in the proper manner (i.e., the word "website" as a link to "example.com"), the web client seems do not allow the HTML injection (i.e., all the content is reported as text).
 Any advice?
Thanks in advance.

0 votes


Permanent link
I have not tried with medium HTML attributes. I used the Wiki type attribute and it seems to work there. An example using JavaScript can be found here in Lab 5 at the end.

0 votes

Comments

We are still on v2.0.x and the Wiki type attribute seems not to be available (https://jazz.net/library/article/129/). 

Sorry, I can't even test that easily anymore, because I got rid of my 2.x installs recently.

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

Question asked: Feb 09 '09, 12:40 p.m.

Question was seen: 8,737 times

Last updated: Oct 15 '13, 7:03 a.m.

Confirmation Cancel Confirm