disabling web batching in jira results in multiple js errors

Carsten Hilber
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2016

I am developing a plugin for JIRA using quickreload. To debug my js files I want to turn of web resource batching.

I started to provide a quickreload.properties file like described in the doc here. I provided that file in /src/main/resources but when starting quickreload tells me that webresource batching is enabled. I also tried to place the file in the root directory, no effect alt all. In the documentation mentioned earlier they say that pressing B is toggeling dev mode as well, so I tried that option. 

I presses 'b' in chrome and I got a flag that now batching is disabled. A quick look at the QR Control Panel (http://localhost:2990/jira/plugins/servlet/qr) shows that all develop properties are turned on now.

Now when I try to reload the page, I get thousands of js errors and the page will not be displayed. Most of them tell me that define is not defined, that may be because of my use of the require implemantation of atlassian. The key reason for this seems to be an error that is failing to load some Atlassian stuff: jira/common/header missing wrm/context-path. 

I thought maybe enabling dev mode in qr properties would help, but this seems to be ignored at all. Since this slows development down I think I will go back to fastdev, never had such a problem there. 

Any suggestions?

thx Carsten

 

4 answers

1 accepted

2 votes
Answer accepted
pelizza
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.
November 8, 2016

As @Carsten Hilber did, just use the recommended configuration form QuickReload's Bitbucket repo using version 1.30.2. I couldn't make it work using a previous version:

<plugins>
           <plugin>
               <groupId>com.atlassian.maven.plugins</groupId>
               <artifactId>maven-jira-plugin</artifactId>
               <version>${amps.version}</version>
               <extensions>true</extensions>
               <configuration>
                   <productVersion>${jira.version}</productVersion>
                   <productDataVersion>${jira.version}</productDataVersion>
                   <allowGoogleTracking>false</allowGoogleTracking>
                   <enableFastdev>false</enableFastdev>
                   <enableDevToolbox>false</enableDevToolbox>
                   <enablePde>false</enablePde>
                   <skipRestDocGeneration>true</skipRestDocGeneration>
                   <skipManifestValidation>true</skipManifestValidation>
                   <extractDependencies>false</extractDependencies>
                   <skipManifestValidation>true</skipManifestValidation>
                   <enableQuickReload>true</enableQuickReload>
                   <pluginArtifacts>
                       <pluginArtifact>
                           <groupId>com.atlassian.labs.plugins</groupId>
                           <artifactId>quickreload</artifactId>
                           <version>${quick.reload.version}</version>
                       </pluginArtifact>
                   </pluginArtifacts>
                   ...
               </configuration>
           </plugin>
       </plugins>
 
<properties>
   <amps.version>6.2.6</amps.version>
   <quick.reload.version>1.30.2</quick.reload.version>
   <jira.version>7.2.3</jira.version>
</properties>
0 votes
pelizza
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.
November 8, 2016

Awesome, thank you so much!

Actually, I have already tried this solution, but with another quick.reload.version. Using yours did the trick! I've found it on quick reload's Bitbucket repo: https://bitbucket.org/atlassianlabs/quickreload/overview

I'll put this as an answer.

0 votes
Carsten Hilber
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 8, 2016

Hi Vitor,

yes, ist was a problem with documentation. You have to configure the version of quick reload as a dependency to the plugin like this:

<plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-jira-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <jvmArgs>-Datlassian.mail.senddisabled=false -Datlassian.mail.fetchdisabled=false -Dplugin.resource.directories=/src/main/resources</jvmArgs>
                    <productVersion>${jira.version}</productVersion>
                    <productDataVersion>${jira.version}</productDataVersion>
                    <allowGoogleTracking>false</allowGoogleTracking>
                    <enableFastdev>false</enableFastdev>
                    <enableDevToolbox>false</enableDevToolbox>
                    <enablePde>false</enablePde>
                    <skipRestDocGeneration>true</skipRestDocGeneration>
                    <skipManifestValidation>true</skipManifestValidation>
                    <extractDependencies>false</extractDependencies>
                    <skipManifestValidation>true</skipManifestValidation>
                    <enableQuickReload>true</enableQuickReload>
                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.labs.plugins</groupId>
                            <artifactId>quickreload</artifactId>
                            <version>${quick.reload.version}</version>
                        </pluginArtifact>
                    </pluginArtifacts>
                    <applications>
                        <application>
                            <applicationKey>jira-software</applicationKey>
                            <version>${jira.software.application.version}</version>
                        </application>
                    </applications>
                    <testGroups>
                        <testGroup>
                            <id>jira-integration</id>
                            <productIds>
                                <productId>jira</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                            </includes>
                        </testGroup>
                    </testGroups>
                </configuration>
            </plugin>
		</plugins>
 
 <properties>
	<amps.version>6.2.6</amps.version>
 	<quick.reload.version>1.30.2</quick.reload.version>
	<jira.version>7.2.3</jira.version>
 </properties>

see the plugin artifacts under the configuration section....

0 votes
pelizza
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.
November 8, 2016

Hey @Carsten Hilber,

I'm having the same problem here so far and have already tried a lot of different configurations of QuickReload without any luck.

Any updates about this problem?

Thanks!

Suggest an answer

Log in or Sign up to answer