Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

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

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

    Code Block
    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.

...

Filter by label (Content by label)
page
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@135a7
showSpacefalse
sortmodified
showSpacetypefalsepage
reversetruetype
labelskb-how-to-article
cqllabel = "kb-how-to-article" and type = "page" and space = "PKB"labelskb-how-to-article
Page Properties
hiddentrue

Related issues