Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira issue collector for react app

Has anyone integrated Jira issue collector with the react application?

Please guide.




4 answers

I got it to work on react no need for jquery

On you index.html


<script type="text/javascript" src="https://jira..."/>


  window.ATL_JQ_PAGE_PROPS = {

    "triggerFunction": function(showCollectorDialog) {

        window.showCollectorDialog = showCollectorDialog;




On your react component:


<FeedbackButton onClick={()=>window.showCollectorDialog()}  > </FeedbackButton>

Working for me also but with jquery only,  jquery is required for the issue collector functions getting the error without it.

I added the script in  componentDidMount

componentDidMount() { window.jQuery = jQuery; const script = document.createElement('script'); script.src = 'https://jira.{corp}.com/jira/.....'; script.async = true; document.body.appendChild(script); }


Thanks for your help.

Where did you set window.ATL_JQ_PAGE_PROPS? on the  componentDidMount too?

I have removed it, not using a custom trigger now.


I tried your solution @u691307 and it works, I can now open a "Report a bug" Atlassian window but I can't select any fields to write in.

After some tests, I think the problem is Material-UI. If I call the trigger inside a Material-UI component the dialog window appears and I can't write in the fields. But If I call the trigger in a <a> outside Material-UI components it works.

Can any of you share your code? I tried but without success

Like elaine-wow likes this

I was able to use jira issue colector with react using these ways:

onClick={() => {
let blankWindow ='about:blank');
let document = blankWindow?.document;
<script src=""></script>
<script>your jira collector url...</script>
<script>your jira collector url...</script>
<script type="text/javascript">window.ATL_JQ_PAGE_PROPS = {
"triggerFunction": function (showCollectorDialog) {
jQuery(document).ready(function () {
setTimeout(function () {
}, 50);
Collector Button


import the collector script in your tsx/jsx with the below content:

window.ATL_JQ_PAGE_PROPS = {
"triggerFunction": function(showCollectorDialog) {
//Requires that jQuery is available!
jQuery("#feedback-button").click(function(e) {

set in your useEffect or componentDidMount

const script = document.createElement('script');
const script2 = document.createElement('script');

script.type = 'text/javascript';
script.src='your jira collector url'
script.async = true;
script2.type = 'text/javascript';
script2.src='your jira collector url'
script2.async = true;


and create the button with the correct id

<Button id="feedback-button">Collector</Button>

To add onto u691307's response, If anyone comes across this and needs access to multiple widgets, simply change the variable name in the source and the corresponding onClick.  Example:

window.showCollectorDialog = showCollectorDialog;
window.showCollectorDialog2 = showCollectorDialog;
window.showCollectorDialogBestWidgetEver = showCollectorDialog;

I included the jira scipts in the index.html (sorry for the terrible formatting)

<script type="text/javascript"  src="jirascript.js"></script>    

<script type="text/javascript">    
window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, {        
triggerFunctionfunction (showCollectorDialog) {          $('#giveFeedback').on('click'function (e) {            e.preventDefault();            showCollectorDialog();          });        },      });    

  Declared in my component:

<a href="#" id="giveFeedback">Give feedback</a>

However, if you are using Material UI, and say want to put this in a popup or dialog, you may run into issues that one of the users previously mentioned where the text fields are not clickable. There's a z-index issue, so I just targeted the id in my CSS, and make sure it's marked as important or it will not override the default z-index that is set:

#user-settings {z-index200000000000 !important;}

Hope this helps. 

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you