Forums

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

JavaScript works on JIRA-Plugin locally but not on the actual server.

hamed.homaee June 11, 2020

Hi,

I have created a plugin using "atlas-create-jira-plugin" command. 

I have added a JavaScript file to the "JS" folder and added it to the "atlassian-plugin.xml" file. 

It works perfectly on the local instance, but when I upload the JAR file on the server, it doesn't work. 

It is a simple alert function, just to make sure my JS works or not. 

 

window.addEventListener('DOMContentLoaded', (event) => {

    alert("hello");

});

 

I appreciate your help, thanks. 

2 answers

1 accepted

1 vote
Answer accepted
hamed.homaee June 19, 2020

Thanks everybody for your replies. 

 

To be honest, I could not figure that out, so I removed the project and created a new one, right now everything works. However, I think there were some issues with my "atlassian.plugin.xml" file, it was not configured correctly. 

 

Best regards, 

Hamed

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 16, 2020

Hello @hamed.homaee ,

Welcome to the Atlassian Community!

This question has been created against Jira Cloud Free, but "atlas-create-jira-plugin" is actually for Jira Server:

 

Can you kindly clarify what you are doing as well as provide the exact steps you are following?

Also, are you getting any error message when this does not work?

 

Finally, please notice that this is not the best place to get help on development  related questions. The right resources are listed in https://developer.atlassian.com/resources. 

Specifically:

 

Cheers,
Dario

hamed.homaee June 17, 2020

Hello Dario,

 

Thank you so much for your response. 

 

First, I apologise, I did not notice this forum is for "Jira Cloud" related topics. 

 

However, the issue is that my script does not get loaded into the production instance. 

But because I found out that there is a Webpack plugin, which configures the "atlassian.plugin.xml" file in the most appropriate way, right now I am trying to using and testing it. 

 

I will let you know about my progress. 

 

Best regards

Like Dario B likes this
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 18, 2020

Thanks for the update @hamed.homaee

However, since this is a development related question, I might not be the best person to help. In case of further issues with this  I would advise to either Ask the Developers Community or Create a Developer Support Request.

 

Cheers,
Dario

hamed.homaee June 18, 2020

Thank you so much,

I will continue this topic in the "Ask the Developers Community" section. 

 

Best regards,

Hamed

Like Dario B likes this
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 19, 2020

You are very welcome @hamed.homaee . Remember you can also create a DEVHELP ticket in case nothing else works. :) 

It would be nice if, once your issue is solved, you could spare some time to paste the solution in a new answer and accept it in order to mark this thread as resolved.

Have a nice weekend!

Dario

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events