Not able to set string as hyperlink for Wiki Attribute in Attribute Customization
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
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
Comments
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.
And the syntax is: [[URL|LinkName]] e.g. [[http://www.google.com|Google]]