I encountered issues while experimenting with the 10.0.1 version of Jira, specifically with the new web item provider API. The core problem is that the module descriptor consistently returns null. This issue persists across initial attempts in our application, where the init
method fails to execute upon both fragment creation and subsequent render triggers.
Further testing reveals that the getItems
method is called as expected, yet the module descriptor remains null so I am unable to get any params from the module descriptor.
To isolate the issue, I created a minimal plugin using the atlas-create-jira-plugin
command, incorporating a class identical to that in your pull request example. This setup also includes a new web section and web item provider, located in a commonly accessed section by our appās users:
<web-section key='active-issues' name='ScriptRunner active-issues' location='find_link' weight='1'>
<label>Test section</label>
</web-section>
<web-item-provider key='my-item-provider' name='ScriptRunner web item provider - my-item-provider' section='find_link/active-issues' class='mattsJiraApp.fragments.ScriptWebItemProviderVersionTwo'>
<param name='providerClass' value='test' />
</web-item-provider>
My repository for the minimalist Atlassian plugin is available for review/testing here. cd
into the adaptavist directory when cloned to get to the root level of the maven project.
It can be executed via IDEAās Maven tool window, using the jira:debug
Maven goal.
The primary error manifests in the atlassian-jira.log
within the adaptavist/target/jira/home/log
directory when attempting to trigger the render by clicking the issues dropdown from the navigation bar:
2024-09-10 11:07:30,323+0100 http-nio-2990-exec-5 url: /jira/rest/api/1.0/menus/find_link; user: admin ERROR admin 667x4356x1 1hprw0s 0:0:0:0:0:0:0:1 /rest/api/1.0/menus/find_link [c.a.p.r.v2.exception.ThrowableExceptionMapper] Uncaught exception 70442082-c845-4631-b0ac-ad3ba887a8bc thrown by REST service: java.lang.NullPointerException: Cannot invoke "com.atlassian.plugin.web.api.descriptors.WebItemProviderModuleDescriptor.getParams()" because the return value of "mattsJiraApp.fragments.ScriptWebItemProviderVersionTwo.access$000(mattsJiraApp.fragments.ScriptWebItemProviderVersionTwo)" is null
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException: Cannot invoke "com.atlassian.plugin.web.api.descriptors.WebItemProviderModuleDescriptor.getParams()" because the return value of "mattsJiraApp.fragments.ScriptWebItemProviderVersionTwo.access$000(mattsJiraApp.fragments.ScriptWebItemProviderVersionTwo)" is null
As far as I can tell I am following exactly what was in your PR for the test ParamPassthroughWebItemProvider example.
When testing with debug points I cannot see the init method mattsJiraApp.fragments.ScriptWebItemProviderVersionTwo#init
being triggered at all, even on re-enable startup.
I can see itemSupplier logic in com.atlassian.plugin.web.descriptors.WebItemProviderModuleDescriptor#init
being hit, but the webItemProvider.init(this);
never seems to hit my web item provider classes (ScriptWebItemProviderVersionTwo) init method
@mkemp Any pointers on what is going wrong here?
Repo for my minimal code attempt is here