Hi, I have a simple question that I could not find in the documentation or examples. How do I set the thumbnail for a custom report? Preferably, there would be a way similar to how the plugin icon/logo is set:
<plugin-info>
<description>${project.description}</description>
<version>${project.version}</version>
<vendor name="${project.organization.name}" url="${project.organization.url}" />
<param name="plugin-icon">images/pluginIcon.png</param>
<param name="plugin-logo">images/pluginLogo.png</param>
</plugin-info>
Add a new web-resource referring to your images and ccs-file having "test-report-thumbnail" to your atlassian-plugin.xml and set the context of that web-resouce to "com.atlassian.jira.project.reports.page
". This resources will be automatically downloaded and you do not have to write any code (implicit knowledge).
Kind regards,
Frank
Hi,
After long time of searching I found the page which describes how to add thumbnail for custom report.
You have to create new css class which will contain defined background-image attribute like here:
body .test-report-thumbnail:before { width: 268px; height: 138px; background-repeat: no-repeat; background-image: url(images/test-logo-report.png); }
After you create css class you have to use it in report's xml definition in atlassian-plugin.xml file:
<thumbnail cssClass="test-report-thumbnail" />
I hope this post will be helpful for others.
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<thumbnail cssClass=
"test-report-thumbnail"
/> seems to be fine.
But here, I have an issue in loading the css file contents in my custom reports. Any suggestions?
I tried writing some code in .css file. But nothing is getting reflected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Frank. It helped me to load my css into reports page!
css
body .report-thumbnail-userworklogreports:before { background-image: url("sample.png"); }
atlassian-plugin.xml
<web-resource> <resource type="download" name="sample.png" location="images/sample.png"/> <context>com.atlassian.jira.project.reports.page</context> </web-resource> <reports> ... <thumbnail cssClass="report-thumbnail-userworklogreports" /> ... </reports>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.