Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom-triggered issue collector not working

Marko Zühlsdorf
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 21, 2018

We like to include an issue collector on a certain confluence page. The first version went with the vertical trigger style and it was fine. It was, however, decided to go with the custom trigger style, and I cannot get it to work. The idea is to click an image and to raise a ticket. Since I'm inexperienced with html and JavaScript, I wanted to test first on an html page, using the provided example. Using one of the non-custom trigger style, everythings works, but as soon as I switch in the JIRA project settings to custom trigger style, no ticket is raised, no response whatsoever.

Here is the code of the current test implementation:

<!doctype html>
<html>
<head>
    <!-- Load jQuery-->
    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script>
    <!-- Issue Collector-->
    <script src="path-to-issue-collector"></script>
    <script>
        window.ATL_JQ_PAGE_PROBS =
            {
                "triggerFunction":
                    function (showCollectorDialog) {
                        jQuery("#feedback-button").click(
                            function (e) {
                                
                                e.preventDefault();
                                showCollectorDialog;
                            }
                        );
                    }
            };
        </script>
</head>

<body onload="jqAvail()">
    <h2>JIRA Issue Collector Demo</h2>
    <p id="jqText"></p>
    <img src="pic.JPG" id="feedback-button"></img>

    <!-- Check if jQuery is available-->
    <script>
        function jqAvail()
        {
            if (typeof jQuery != "undefined")
                document.getElementById("jqText").innerHTML = jQuery.fn.jquery;
            else
                document.getElementById("jqText").innerHTML = "jQuery not available";
        }
    </script>

</body>
</html>

As you can see, I made clear, that jQuery is loaded. What am I doing wrong? Help is highly appreciated!

1 answer

0 votes
Peter D. October 25, 2018

I'm having the same issue, were you able to figure out what was causing this?

Marko Zühlsdorf
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 26, 2018

I was, but I‘m not sure if my „Solution“ is of any help. There are two typos in the snippet above:

ATL_JQ_PAGE_PROBS —> ATL_JQ_PAGE_PROPS

showCollectorDialog —> showCollectorDialog()

After correcting, everything was running.

Like Matt Roper likes this

Suggest an answer

Log in or Sign up to answer