Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.
×Hello,
im trying to load JS file into the web-resource which is entered in announcement banner.
can anyone tell me how to enter the path of my JS file and also should i include <script> tag and is there a way to get project name or project using js so that i can apply setting only to certain projects.
Better write an add-on with your JavaScript file. It is not that much difficult.
Just create a plugin. You can find a tutorial here:
https://developer.atlassian.com/server/framework/atlassian-sdk/create-a-helloworld-plugin-project/
There will be resources in the atlassian-plugin.xml. Add jira.create.issue to the context tag. The context tag defines when your resources will be downloaded. jira.create.issue means that it will be available for the create issue screen. Then you can change your js file which you can find in src/main/resources/js.
Then run
atlas-run
and try to create an issue. Your js will be downloaded for the screen.
You can find available contexts here:
https://developer.atlassian.com/server/jira/platform/web-resource/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is Jsincluder plugin which will let you add your javascript file to the create, edit, view and transition issue screens.
https://marketplace.atlassian.com/plugins/ru.mail.jira.plugins.jsincluder/server/overview
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.