I'm using the Jira "Issue Collector" plugin to collect feedback on Confluence pages.

Dave Drexler March 21, 2012

The embedded Javascript works fine in the global Custom HTML, but I'd like to make this space-specific.

I tried adding the Javascript to the Header and Footer sections in the Documentation Theme configuration, but no dice.

Any suggestions?

7 answers

3 votes
Pavel Zubov September 15, 2016

Hi, Dave!

You can create a custom feedback forum and submit requests from it via email using Customer Case add-on for JIRA Cloud. In addition, you can also open the customer portal to your customers and users, so they can quickly browse the existing ideas and vote for them.

This will allow you to get a quick picture of your real customers' demands. 
You can learn the details here: https://stiltsoft.customercase.com/forums/customer-case-for-jira/ideas/2800-add-support-for-widgets 

2 votes
Martin Cleaver
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 2, 2012

How I did this is as follows:

New macro: x-issue-collector:

##
## Developed by: My Name
## Date created: dd/mm/yyyy
## Installed by: My Name

## @noparams
<script type="text/javascript" src="http://yoursite/s/en_USodxtav/772/3/1.1/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?collectorId=6d939084"></script>
</script>

Then in the skin (we used RefinedWiki, so in their Space footer or anywhere similar that takes a macro):

{x-issue-collector}

Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2014

Seems to work in the RefinedWiki only if you are logged out, while it works in the standard theme also when you are logged in (at least in our version/configuration).

Just in case someone is also trying to get the issue collector running - check if it works if you are not logged in ... :)

Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2014

Well, actually the feedback button was hidden behind the right toolbox. If the window is small enough that the toolbox is withdrawn, the feedback button gets into the view.

Since the toolbox is not shown for anonymous users I was mistaken to think that the login status has something to do with it: It does not.

1 vote
Jesse Martinez August 28, 2012

I found that wrapping the Issue Collector generated script with additional script tags helped the user macro get executed rather than rendered as html.

1 vote
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 18, 2012

If you're using the Documentation theme and having problems with the footer, why not create a user macro then embed that into the footer.

e.g. this user macro placed in the footer will manage to cause absolute annoyance:

<script>
  alert(' +++++ $space.key $space.name +++++ ');
</script>

The javascript runs though, so it's a step forward for you. You can likely adapt it to your needs.

Dave Drexler April 18, 2012

Thanks, David! I'll give that a try.

Dave Drexler April 18, 2012

Bummer... that approach didn't work, either. I tried wrapping the user macro in {html} macros, both in the user macro definition, and in the call to the user macro in the Doc Theme footer. I also tried the "Generates HTML" and "Generates Wiki Markup" user macro settings.

Nothing seems to run the script when the page renders.

1 vote
Tom Moors
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 28, 2012

Hi Dave,

Can you check if the script is included in a correct script block, e.g.

<script type="text/javascript">
//<![CDATA[

-- your code here --

//]]>
</script>

Would it be possible to paste your snippet?

An other way to make it work is to include it in the site-wide custom HTML (this works fine for me).

Regards,

Tom

Dave Drexler March 29, 2012

Hi Tom - when pasted into the Doc Theme's footer, the snippet shows up in the page source code like this:

&lt;div id="theme-footer"&gt;
            script type="text/javascript" async src="http://10.38.160.150/s/en_US6rouvu/665/2/1.0.23-beta/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?collectorId=1289abf5"&gt;&lt;/script&gt;
        &lt;/div&gt;

It works fine in the site-wide custom HTML; what I'm trying to do is get space-specific snippets, so I can log issues into different Jira projects, based on space.

1 vote
Adolfo Casari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 21, 2012

Did you enable the HTML macro ??

Dave Drexler March 21, 2012

Yes. Embedded directly in a page, the Javascript snippet works fine when surrounded by the HTML macro.

In the Header or Footer customization fields in the Documentation Theme configuration, however, the Javascript just gets passed through to the rendered screen; it doesn't get run. Same results whether surrounded by the HTML macro or not.

Dave Drexler March 27, 2012

Yes, the HTML macro is enabled.

1 vote
SimonS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 21, 2012

Hey Dave,

You could put the JavaScript in an HTML macro on a space. The user would have to navigate to that page to use the collector, but it could be specific to pages or spaces that way.

-Simon

Dave Drexler March 21, 2012

Thanks, Simon. We have 4 spaces in which we're particularly interested, and the spaces average 300 pages each. Adding the snippet per-page would be pretty tedious; I'm looking for a way to add a space-specific snippet to all the pages in each of those four spaces. The four spaces all use the Documentation theme, so I thought the footer customization would be perfect, but the Javascript doesn't get run - it just shows up in the footer as if it were text. I also tried wrapping the Javascript in {html} macros, to no avail.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events