How to set a thumbnail for custom JIRA report
How to set your own thumbnail for custom JIRA report? I’ll show you in this post.
These instructions have been tested in JIRA 7.2.2.
Create the thumbnail image
Create the thumbnail as .png image. The maximum oficially supported dimensions are 268 x 138 px (height of 140px seems to be working too, though). If the image is smaller, it will be displayed in the center of the thumbnail area. Save the image in the *plugin_root*\src\main\resources\images
folder.
Add some css
Add the following code to your report’s css file (the one specified in the web-resource
section of the atlassian-plugin.xml
). You can use any css class name you want, but the :before
selector is important.
Optionally, add width and height properties that match the thumbnail size (e.g. width: 268px; height: 140px;
) to speed up page display.
Modify your atlassian-plugin.xml
Add a new context com.atlassian.jira.project.reports.page
to the web-resource
in your atlassian-plugin.xml
file:
Staying in the atlassian-plugin.xml
, specify the class you used in the css file using the thumbnail
tag in the report section:
That should do it, enjoy your own thumbnail.
Comments