Problem with jira.create.issue web resource context in plugin?

Tsol
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.
January 29, 2013

Hi everybody,

i'm trying to create a plugin with some javascripts files that will be loaded in create issue pop up screen.

Jira current version is: 5.2.3.

I have found some related question but i didn't manage to find a solution.

In xml file i'm using the following

<web-resource key="test-js" name="javascript">
        <dependency>jira.webresources:global-static</dependency>
        <description>JavaScript</description>
        <resource name="test.js" type="download" location="/js/test.js" />
        <context>jira.create.issue</context>
    </web-resource>

My javascript file is the following

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
jQuery("#customfield_12300").hide();
});

The problem is that javascript is not loaded at all.

If i use

<context>atl.general</context>

in xml, javascript is loaded.

I don't know if i'm going to use

<context>atl.general</context>

instead of

<context>jira.create.issue</context>

will make page loading slower.

Thanks in advance,

Kostas

4 answers

1 accepted

0 votes
Answer accepted
Renjith Pillai
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.
January 29, 2013

If you right click and open the create issue link in a new tab, is the javascript getting loaded (while using 'jira.create.issue' context)? I am thinking with the introduction of create issue pop, there might be a change.

Just a thought.

Tsol
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.
January 29, 2013

It works that way.

It thought that jira.create.issue would work on pop up create screen.

If i change the .js file is there a way to make it work?

Cheers

Renjith Pillai
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.
January 29, 2013

Changing javascripts won't help. Just include that in atl.general. Anyway they won't be downloaded everytime, until a complet refresh is done for the pages, else the browser will use the cached js files.

Tayyab Bashir
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.
January 4, 2016

Hi, Could you please tell me what context did you use for the issue transition windows?

0 votes
Tayyab Bashir
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.
January 4, 2016
0 votes
Tayyab Bashir
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.
January 4, 2016

Hi, Could you please tell me what context did you use for the issue transition windows?

0 votes
Natalie Wenz March 17, 2014

Try to use <dependency>com.atlassian.auiplugin:ajs</dependency> instead of jira-webresource:global-static dependency.

Suggest an answer

Log in or Sign up to answer