It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do you set a thumbnail for a custom JIRA report

Jack Davidson Aug 12, 2015

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>

3 answers

1 accepted

1 vote
Answer accepted
Frank Polscheit Sep 13, 2016

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 

3 votes
Łukasz Szarecki Jan 04, 2016

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:

&lt;thumbnail cssClass="test-report-thumbnail" /&gt;


I hope this post will be helpful for others.


Best regards

Prisy Cherian Jun 27, 2016

<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.

0 votes
Prisy Cherian Sep 26, 2016

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

 

&lt;web-resource&gt;
&lt;resource type="download" name="sample.png" location="images/sample.png"/&gt;
&lt;context&gt;com.atlassian.jira.project.reports.page&lt;/context&gt;
&lt;/web-resource&gt;
&lt;reports&gt;
...
&lt;thumbnail cssClass="report-thumbnail-userworklogreports" /&gt;
...
&lt;/reports&gt;

 

 

 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

9,185 views 28 42
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you