Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Export Issues - Print Details

Fetu Ah Young July 18, 2024

I want to export multiple issues with attachments (photos as attachments) by using the Print details option under Export Issues.

This way we can see all the issues with images embedded in.

I couldn't get this working, it shows images as a text file but no image.

The work around is to put images in description but we have over 1000 issues

Had a look at Better PDF Exporter but only can do single pdf but also doesn't work sometimes displaying images.

Any help or suggestion will be much appreciated.

 

2 answers

2 accepted

1 vote
Answer accepted
Mikel Garcia Bartolome
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 19, 2024

Exporting issues from Jira Cloud with embedded images can be challenging, especially when you want to do this for multiple issues at once. Here are a few potential solutions to achieve this goal:

Using "Better PDF Exporter for Jira Cloud"

Since you have mentioned trying the "Better PDF Exporter" plugin but faced issues, ensure you are following the correct steps and check if there are any updates or support from the plugin developers.

Utilizing Custom Scripts

If you have programming skills or can engage a developer, using the Jira REST API along with a script to export the issues and their attachments into a document format (like PDF) could be a viable solution. This approach gives you complete control over how the data and images are presented.

Here's a simplified version of how you can achieve this:

  • Fetch issues from Jira

Use the Jira REST API to fetch issues with their attachments. You can use a script written in Python for this purpose.

  • Create a script to generate a PDF

Use a library like `fpdf` or `reportlab` in Python to create a PDF with embedded images.

Example Python Script

1. Fetching issues with attachments

import requests
from requests.auth import HTTPBasicAuth
import json

# Jira API endpoint
JIRA_URL = "https://your-domain.atlassian.net/rest/api/3/search"

# Authentication
auth = HTTPBasicAuth("your-email@example.com", "your-api-token")

# JQL query to fetch issues
query = {
'jql': 'project = "YOUR_PROJECT_KEY"',
'fields': ['summary', 'description', 'attachment'],
'maxResults': 1000 # Adjust as necessary
}

# Request issues
response = requests.post(JIRA_URL, auth=auth, headers={"Content-Type": "application/json"}, data=json.dumps(query))
issues = response.json()['issues']

# Download attachments
for issue in issues:
for attachment in issue['fields']['attachment']:
attachment_url = attachment['content']
attachment_response = requests.get(attachment_url, auth=auth)
with open(f"attachments/{attachment['filename']}", "wb") as file:
file.write(attachment_response.content)

2. Generating a PDF with embedded images:**

from fpdf import FPDF

class PDF(FPDF):
def header(self):
self.set_font('Arial', 'B', 12)
self.cell(0, 10, 'Jira Issues Report', 0, 1, 'C')

def issue(self, summary, description, attachments):
self.set_font('Arial', '', 12)
self.cell(0, 10, f'Summary: {summary}', 0, 1)
self.multi_cell(0, 10, f'Description: {description}')
for attachment in attachments:
self.image(f'attachments/{attachment}', w=100)
self.ln(10)

# Create a PDF instance
pdf = PDF()

# Add a page
pdf.add_page()

# Add issues to PDF
for issue in issues:
summary = issue['fields']['summary']
description = issue['fields']['description']
attachments = [att['filename'] for att in issue['fields']['attachment']]
pdf.issue(summary, description, attachments)

# Output the PDF to a file
pdf.output('jira_issues_report.pdf')

Using Third-Party Tools

There are other third-party tools available which might offer the functionality you need:

  • Jira PDF View Plugin
  • Jira Cloud for Excel

These tools sometimes offer better support for handling attachments and might provide more reliable results than the built-in export options.


While the process can be complex, using the Jira REST API with a custom script gives you the flexibility to export issues and their attachments in the desired format. If scripting isn't an option, exploring third-party tools and plugins might provide a solution.

0 votes
Answer accepted
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 19, 2024

@Fetu Ah Young I am a developed working on the Better PDF Exporter app.

It is not clear what do you mean by these?

  • "only can do single pdf"
  • "doesn't work sometimes displaying images"
Fetu Ah Young August 5, 2024 edited

Hi,

Thanks for the reply. Have found that i can export bulk issues to pdf only if you have a saved filter.

I couldn't see this option when opening the Issues tab. 

It is sorted now.

Thanks

Like Aron Gombas _Midori_ likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Upcoming Jira Events