Launch a JIRA Issue Collector via GoogleAppsScript

Peter Lee April 29, 2018

Hi,

We use google sites for teams to expose what they do, and I'd like to hook up a Jira Issue Collector vis GoogleAppsScript to a google site page.

Does anyone know how to do this?

Because I can't edit the google site page directly I don't think its possible to edit the html of the page or modifying the javascript to trigger the issue collector on button click etc.

 

2 answers

1 accepted

1 vote
Answer accepted
Peter Lee May 1, 2018

In order to use GoogleAppsScript to allow embedding of a Jira issue collector on a page you create a Web App that renders the desired HTML.

1) Create a new googleappscript

2) Within the Code.gs

add a handler for a get request

function doGet()
{
return HtmlService.createHtmlOutputFromFile('example.html');
}

3) Add an example.html with the relevant html build from the jira custom issue collector html

eg.

<!DOCTYPE html>
<html>

<!-- your custom issue collector here -->

</html>

4) Just inside the setup of the function set a timeout to trigger the issue collector after screen load

"triggerFunction": function(showCollectorDialog) {

setTimeout(function() {
if(showCollectorDialog !== undefined)
showCollectorDialog();
}, 100);

...
}

 5) Publish the GoogleAppsScript as a webapp

 This can now be added to a new google site via embedded URL etc.

1 vote
Arthur Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 1, 2018

Hi Peter,

 

As you do not have how to modify the source page to embed the issue collector, an alternative would be upon using a client-side tool that could perform such changes locally. My personal suggestion is to try Tampermonkey, which allows Javascript code to be executed and therefore it can be used for adding/removing content from a rendered page.

Note that your client machines will also need to install the Tampermonkey extension according to their browser, however this could be an option. What do you think?

 

Regards,
Arthur Gonçalves | Atlassian Support

Peter Lee May 1, 2018

Thanks Arthur. I did manage to work out how to do this just using the basic tools available in gsuite. I'll post what I've done in a seperate answer.

Christine Nguyen March 21, 2023

@Peter Lee 

I am running across similar issue and trying to embed issue collector on a google site.  Sounds like you have found a worktable solution,  would you mind sharing?

 

Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events