Custom Report does not show on the Project's Reports screen

Ivana Navratilova August 30, 2017

I have been trying to create a custom report, mostly for learning purposes, following the Atlassian tutorial.

I have added the <report> in the atlassian-plugin.xml like this

<report name="Detailed Issue Report" i18n-name-key="detailed-issue-report.name" key="detailed-issue-report" class="com.principal.jira.reports.DetailedIssueReport">
<description key="detailed-issue-report.description">The Detailed Issue Report Plugin</description>
<resource name="view" type="velocity" location="/templates/reports/detailed-issue-report/view.vm"/>
<resource name="i18n" type="i18n" location="DetailedIssueReport"/>
<label key="detailed-issue-report.label"></label>
<properties>
<property>
<key>projectid</key>
<name>report.issuecreation.projectid.name</name>
<description>report.issuecreation.projectid.description</description>
<type>filterprojectpicker</type>
</property>
<property>
<key>startDate</key>
<name>report.issuecreation.startdate</name>
<description>report.issuecreation.startdate.description</description>
<type>date</type>
</property>
<property>
<key>endDate</key>
<name>report.issuecreation.enddate</name>
<description>report.issuecreation.enddate.description</description>
<type>date</type>
</property>
<property>
<key>interval</key>
<name>report.issuecreation.interval</name>
<description>report.issuecreation.interval.description</description>
<type>long</type>
<default>3</default>
</property>
</properties>
</report>

I have created the Java file and the view.vm file.

public class DetailedIssueReport extends AbstractReport {
... some custom code
public String generateReportHTML(ProjectActionSupport support, Map map){
... some variable setting
return descriptor.getHtml("view", velocityParams);
}
}

I have added the properties into the DetailedIssueReport.properties file and some were automatically generated into the main properties file.

Now the tutorial ends here, basically saying that it works like this. But how do I actually access the report? I do not see it in the Project - Reports, there are just the default ones with the thumbnails. Do I need to add the thumbnail to see the report? Or is there some other magical step that I missed?

 

0 answers

Suggest an answer

Log in or Sign up to answer