How to resolve web-resource version conflict if the resources are batched by the context

Let's suppose, I have a web-resource, which is included into the atl.general context:

<web-resource key="foo" name="FooBar">
        <dependency>com.atlassian.auiplugin:jquery</dependency>
        <context>atl.general</context>
 
        <resource type="download" name="baz.js" location="js/baz.js">
            <property key="content-type" value="text/javascript"/>
        </resource>
</web-resource>

when I browse into issue navigator, with the atl.general context, the batch file is composed with the following URL:

http://BASE_URL/s/en_USsqeg33-1988229788/6095/3/0b73ce5185d4ccdb3c6eabaf74df100c/_/download/contextbatch/js/jira.navigator.simple,jira.navigator.advanced,jira.view.issue,jira.navigator.kickass,atl.general,jira.global/batch.js

If I make changes to the baz.js file, the URL for the batch, containing the baz.js would be the same, thus resulting in me, seing the cached version of the batch.

Is there any way to resolve this conflict of the batch versions? (Any way, except manually refreshing the page - I can not ask the customers to do this after each plugin update)

Thanks in advance.

3 answers

1 accepted

We are including our own resources without any context to all the pages. By calling

...
((com.atlassian.plugin.webresource.WebResourceManager
)webResourceManager).requireResource("foo.bar.baztlassian.qux:foo");
...

From within a Servlet Filter Plugin Module's doFilter method.

If anyone would like me to elaborate, please, ask.

Was this ever resolved?

We've implemented a workaround for this one.

We are including our own resources without any context to all the pages. By calling

...
((com.atlassian.plugin.webresource.WebResourceManager
)webResourceManager).requireResource("foo.bar.baztlassian.qux:foo");
...

From within a Servlet Filter Plugin Module's doFilter method.

If anyone would like me to elaborate, please, ask.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

176 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you