webPanel for issue view does not work for project view

Hi

I have web panel in descriptor (Jira 7.x.x)
<web-panel key=“timereports-time-entry-panel” name=“Time Entry” location=“atl.jira.view.issue.right.context”…>

it works fine for issue view, but in project view it can not find resources and failed with error ‘angular is not defined’ with issue part totally gray, unclicakable and without web panel. (backend returns context map properly for both views)

for cloud similar descriptor with location=“atl.jira.view.issue.right.context” works fine for both issue and project view.

How could I fix it for project view?

Thanks.

I am not 100% but it sounds like you might be having the same issue that I had a few weeks ago. Try reading this topic and try my solution or the other solution provided and see if it works for you.

Parts of javascript not working in issue navigator.

code wrapped by JIRA.bind(JIRA.Events.ISSUE_REFRESHED, function() {}) works fine on issue view only after some actions (so, seems as expected)
but on project view it runs at once with the same error as before.
so I think there are no resources downloaded for project view.
them are at the start of .vm
$webResourceManager.requireResource()

Could you try using this code instead? I remember I had trouble on certain pages and this fixed it for me.

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e, context, reason) {
        if (reason === JIRA.CONTENT_ADDED_REASON.pageLoad){
//your code here
}

The problem is either that none of your recources are loaded or that only your js is not being loaded. If none of your css is loaded either my solution won’t work. You can also try to add atl.general to your web-resource in atlassian-plugin.xml.

I can not run code inside if statement neither for issue view no project view. (I have panel title only, but have no errors for project view :slight_smile: )
alt.general is not an option due to conditions for panel

I may have misunderstood, but have you defined the following three contexts in your <web-resource> within the atlassian-plugin.xml file:

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

These contexts should be in the <web-resource> which you are pulling into your velocity .vm file using the $webResourceManager.requireResource().

This ensures that any javascript files in this <web-resource> are pulled into the velocity template on the issue navigator (project level) views as well as on the full issue view.

None of these context were in my resource and I tried do not use them, but seems it is impossible. The reason why I expect that it is working fine on issue view.

Yes, from what I have seen you will need to define these contexts in your resources in order for the Issue Navigator view to pull in your javascript files as dependencies. As far as i’m aware there is no way around this I’m afraid…

Hi , I a too facing the problem as yours

I have Web item which linked to JS page when the webitem is clicked in the Issue view page it must create a new project

But this webitem works only for Issue.view.oage and it doesnot work in project view page

Kindly please help me in the case as i am new Atlassian development

com.atlassian.auiplugin:ajs I testPlugin jira.view.issue jira.issue.create sd.project.view atl.general The jiraButton Plugin