JS-код не загружается при щелчке веб-ссылки в atlassian sdk при создании плагина jira
После нажатия на веб-элемент должен произойти вызов javascript, который должен отобразить сообщение с предупреждением, но сам файл сценария не загружается.
Ниже приведен код, где я добавил файлы сценариев в разделе ресурсов.
<web-resource key="samplePlugin-resources"
name="samplePlugin Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<resource type="download" name="samplePlugin.css" location="/css/samplePlugin.css"/>
<resource type="download" name="samplePlugin.js" location="/js/samplePlugin.js"/>
<resource type="download" name="jquery-3.3.1.min.js" location="/js/jquery-3.3.1.min.js"/>
<resource type="download" name="SampleReport.js" location="/js/SampleReport.js"/>
<resource type="download" name="images/" location="/images"/>
<context>samplePlugin</context>
<context>jira.general</context>
</web-resource>
Вот мой сайт:
<web-item name="Avg.Resolution Time"
i18n-name-key="avg-.-resolution-time.name"
key="avg-.-resolution-time"
section="reports-link/reports---web---section"
weight="1000">
<description key="avg-.-resolution-time.description">
The Avg.Resolution Time Plugin
</description>
<label key="avg-.-resolution-time.label"/>
<link linkId="avg-.-resolution-time-link"/>
</web-item>
мой SampleReport.js
код
jQuery(document).ready(function() {
jQuery('#avg-.-resolution-time-link').click(function(){
alert("Hello Jira");
});
}