Web resources not loaded for web panel (atl.jira.view.issue.right.context)

Hello,

I have a web panel (atl.jira.view.issue.right.context) and for it I provide the web resources:

<web-resource key="tmTRDetails-assets">
    <transformation extension="js">
      <transformer key="jsI18n"/>
    </transformation>
    <dependency>com.atlassian.auiplugin:ajs</dependency>
    <resource type="download" name="tmDetailsDraw.js" location="merged_cloud/public/js/modules/tmDetailsDraw.js"/>
    <resource type="download" name="tmDetailsDB.js" location="merged_cloud/public/js/modules/tmDetailsDB.js"/>
    <resource type="download" name="tmDetailsMain.js" location="merged_cloud/public/js/tmDetailsMain.js"/>
    <resource type="download" name="tmDetails.css" location="merged_cloud/public/css/tmDetails.css"/>
    <context>com.jira2TM.plugin.tmTRDetails-resources</context>
  </web-resource>

I load them into the vm

  <web-panel name="TMDetails" i18n-name-key="tm-tr-details.label" key="tm-details" location="atl.jira.view.issue.right.context" weight="100">
    <description key="tm-details.description">The TMDetails Plugin</description>
    <resource name="view" type="velocity" location="/templates/tmTRDetails.vm"/>
    <context-provider class="com.RTC.plugin.webpanel.TMDetails"/>
    <condition class="com.RTC.plugin.condition.DisplayTMProjectItems"/>
  </web-panel>

like this: $webResourceManager.requireResourcesForContext(“com.jira2TM.plugin.tmTRDetails-resources”)

The problem is that from project → all issues the web resources are not loaded without raising any error…

But from the issue full view the resources are loaded

Do I need to load the resources from all issues view differently? Or can I do something? I opened a ticket to atlassian suport but they redirected me here…

Thank you very much for your help!
Alina

1 Like

For panels I’ve had better luck using contexts this way to make sure they are loaded.

<context>jira.view.issue</context>
<context>jira.navigator.advanced</context>
<context>jira.navigator.simple</context>

Thank you, I changed the context to the following but no change…

<context>com.jira2TM.plugin.tmTRDetails</context>

Hi @JaimeRomero, you mean to add these contexts. Yes it works with these contexts added!!

Many thanks! :star_struck:

@anon18141430, yes sorry I should have made that more clear. Adding those contexts should cover the web resource loading when viewing issues in different contexts.

1 Like

@JaimeRomero, it is working but I don’t like the fact that the web panel is called 2 times and the content is also created 2 times and you can see a small refresh on it when opening an issue. But at least you can see the content now.
I am using <context>jira.view.issue</context> only.