Adding a Clickable Link to an Element Using Live Fields

Sometimes you would like to add a clickable link to an element to the Jira UI such as a Power Actions button. This guide shows you how.

Instructions

  1. In the Live Fields main script. lfInstantHook() runs "clickableLink.js" when the page is loaded.

    lfInstantHook({}, "clickableLink.js");
  2. In “clickableLink.js”. See this Knowledgebase article on copying the query selector.

    AJS.$(<query selector goes here>).click(function() { window.open(<desired url goes here>); return false; });
  3. Here is a full example of the JavaScript:

    AJS.$("#customfield_10800-val").click(function() { window.open("http://localhost:8080/browse/EX-2"); return false; });

Additional Help

Need help implementing this script? Talk to me directly to me by clicking on the bot on this page.

Related articles

Filter by label

There are no items with the selected labels at this time.