It's all about the answers!

Ask a question

Not able to set string as hyperlink for Wiki Attribute in Attribute Customization


Manjunath Badiger (325) | asked Jan 04 '18, 10:59 a.m.
Not able to set String as hyperlink for wiki attribute

Here is my code :-

dojo.provide("com.example.ValueProvider");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");

(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
    dojo.declare("com.example.ValueProvider", null, {

        getValue: function(attribute, workItem, configuration) {
       
            var test = "Click_here";
            var result = test.link("https://google.com");
            var url = configuration.getStringDefault("WiKiDefaultVal", "{{test") + workItem.getValue(WorkItemAttributes.ID) + "}}";
return url;
        }
    });
})();

Accepted answer


permanent link
Ralph Schoon (59.7k23643) | answered Jan 04 '18, 11:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jan 04 '18, 11:42 a.m.

Sorry, I misread. For a wiki type attribute you wan to check the syntax: http://wikicreole.org/

see

https://jazz.net/forum/questions/94067/displaying-a-hyperlink-with-text-instead-of-the-url-via-calculated-value/228025

Dependent on the business requirement that is not specified this might be a solution as well:

https://jazz.net/forum/questions/218865/how-to-add-a-hyperlink-text-on-an-rtc-workitem


Manjunath Badiger selected this answer as the correct answer

Comments
Ralph Schoon commented Jan 04 '18, 11:41 a.m. | edited Jan 04 '18, 11:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Sorry, I misread. For a wiki type attribute you wan to check the sytanx: http://wikicreole.org/

And you want also test your syntax works by setting it manually that it works and then look at the content in your customization.


Ralph Schoon commented Jan 04 '18, 11:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

And the syntax is: [[URL|LinkName]] e.g. [[http://www.google.com|Google]]

Your answer


Register or to post your answer.