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 "&amp;". 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! |
7 answers
![]()
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&amp;d=00635070724' >00635,070,724</a> Sorry! |
![]()
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 |
|
![]() 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:
But when I save the work item ... :
Is there something I should know about medumHTML type? Thanks |
![]()
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.
|
![]()
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]";(*) 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.
|
![]()
Ralph Schoon (62.0k●3●36●43)
| answered Oct 15 '13, 6:21 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.
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.
|