Manual PDF export of approvals (work item / page)
Description
Goal
Manual, on-demand PDF export of the approvals of one Jira work item or Confluence page. The steps in the PDF look like in the app by default; a table is an option. Covers AP-2550.
This ticket also builds the PDF generation that the other PDF tickets of AP-2363 reuse: AP-541 (PDF step), AP-2368 (approvals list) and AP-2369 (charts).
Change
-
"Export approvals to PDF" in the "..." menu of a work item (Jira) and under Apps in the "..." menu of a page (Confluence), for users who can see the approvals of the work item / page.
-
An "Export to PDF" icon at the right of the New / Approvals / Activity tabs of the work item / page opens the same dialog as the "..." action. It is shown while the Approvals tab is open, and only where that action is available: not for JSM customers, pages only, not blog posts. It is icon-only, so it has no "New" badge.
-
The action opens the "Export approvals to PDF" dialog with three options and Cancel / Export:
-
"Show steps as a table", which starts from the global setting "Show steps as a table" (off by default).
-
"Include details", off by default. When it is on, the dialog lists the fields to export with the basic ones checked (Jira: type, status, priority, assignee, reporter, created, updated; Confluence: space, created by, created, last updated, version, labels). Fields can be unchecked and dragged into another order. In Jira any other work item field, custom fields included, can be added with "Add work item field" and removed again, up to 30 fields; fields the PDF cannot show as text (parent, sub-tasks, attachments, links, time tracking, watchers, votes, progress, last viewed) are not offered.
-
"Include description" (Jira) / "Include page content" (Confluence), on by default.
-
-
In Jira the dialog fits its content with the details off and on. In Confluence the dialog has a fixed size of 600 x 376: with the details on, the field list scrolls and Cancel / Export stay in view. The dialog keeps the same height while the export loads and after it, so Jira does not jump and Confluence shows no empty band.
-
Export downloads
<work item key>-approvals.pdf/<page title>-approvals.pdf, shows "Approvals exported to PDF successfully" and closes the dialog. -
Steps layout: by default the steps look like in the app ("tree"); with "Show steps as a table" they are a table (#, Step, Decision, Date, Comment). The app's own step view is unchanged. The tree has:
-
each step has the coloured status circle and connector line, the avatar and name, the decision, the date and the comment;
-
a vote step shows its title with "Voting group: <group>" under it, as in the app (the table keeps "<group> (Vote)"); group and vote members are indented, with vote counts, the moderator and delegates;
-
parallel groups are framed with their coloured stripe and name; custom-mode groups also show their progress rule (for example "Passed - Approved: 2 of 3, 1 skipped") and a "Required" tag on required sub-steps;
-
the steps called after approval / rejection / validity expiration in their own box.
-
-
Global setting: Global settings > General > Exports (with the "New" badge) has "Show steps as a table", off by default. It makes the table the default for exports. Jira: "When enabled, approvals exported to PDF show their steps in a table instead of as they look on the work item. The Export approvals to PDF dialog starts with this choice." Confluence: "When enabled, approvals exported to PDF and Approval Path macros in exported pages show their steps in a table instead of as they look on the page. The Export approvals to PDF dialog starts with this choice."
-
The native Confluence page export (PDF and Word) of the Approval Path macros follows the PDF's tree as closely as Confluence allows: "Approval values as of the export" comes first, in grey; each step is its name, the decision lozenge and the date in grey, with the comment under it; a vote step's title has its voting group under it; group and vote members are indented under their step; a parallel group is its name in bold with its progress, and its steps are indented under it, as are the steps called after the approval under their title. Confluence draws the lozenges in its own style and has no avatars, status circles, connector lines or coloured frames. It follows the global setting.
-
Links: each approval's name in the PDF links to that approval in the app. It opens the work item or page with the approval in the Approval Path window, the same link as "Open approval" in notification emails. The PDF title links to the work item or page.
-
Dates with time: the dates in the exports show the time, as in the app, in the time zone printed in the header: step decision dates, step due dates (for example "Due Nov 20, 2026, 12:00") and the approval's decision deadline, valid until and expired on. This applies to the PDF export and to the Confluence page export (PDF and Word) of the Approval summary macro, including the "Waiting for" due dates of the page summary. A date never breaks across lines. The Date column of the steps table is as wide as a date with time.
-
Avatars: in Jira, people show their avatar (small, round) left of the name wherever the approval panel shows one (approvers, group and vote members, moderators, delegates) and, in Details, for Reporter, Assignee and user picker fields. Email approvers, groups and steps without a person show none. The export takes at most 100 different avatars per PDF, only from Atlassian avatar hosts; an avatar that cannot be downloaded is left out and the name stays. Confluence PDFs show names without avatars, because Confluence serves avatars only to a signed-in browser.
-
Print layout: no blank last page; section headings, approval titles and outcome boxes stay with what follows; the steps table header repeats on every page; a step tree that breaks across pages ends its line at the last step on the page.
-
PDF layout:
-
Header: "Work item KP-12" / "Page", the title as a link to the work item / page, and "Approval values as of the export: <date> (<time zone>)".
-
Approvals: the current approvals of the work item / page, each with its status badges, progress, decision deadline / valid until and its steps as a tree or a table (group and vote members as their own entries; decisions taken by a delegate or a moderator name them; when the starter or an admin decides a blocked group, they appear as one more entry after the members, with their decision, date and comment). Same data and wording as the page export of the macros (AP-1913). With a single approval the section has no "Approvals" heading.
-
Details (only with "Include details" on): the chosen fields in the chosen order, each with its name and value; values are shown as in the CSV export, dates in the exporting user's time zone, an empty field as "None"; a field deleted meanwhile is left out.
-
Description / page content (only with "Include description" / "Include page content" on), with the images attached to the work item / page.
-
-
Confluence page content: "Approval summary" macros are left out, so the approvals appear once (in the Approvals section). Inline "Approval status" macros show the statuses as of the export.
-
Errors are shown as an error message on the work item / page and the dialog stays open for another try: a PDF over the size limit, or too many exports running at once, shows its reason; any other failure shows "Couldn't export the approvals. Try again."
-
On a Confluence blog post the dialog says "Approvals can be exported from pages only." and Export is off.
PDF generation (shared by the epic)
-
Noto Sans font (Latin including Polish, Greek, Cyrillic), page numbers and one common document header used by every PDF of the epic.
-
The renderer loads nothing from the network. Images come from the work item / page attachments (PNG, JPEG and GIF, at most 5 MB and 16 megapixels each; per PDF at most 30 images, 20 MB and 100 megapixels of PNG / GIF) and, in Jira, from user avatars; they are downloaded and checked by the export and handed to the renderer by name. Other files, external images and images written into the content itself are left out.
-
Avatars are downloaded on their own pool of 20 threads, only from Atlassian avatar hosts (every redirect hop is checked); an address that failed is not tried again for 5 minutes, and downloaded avatars are cached for 6 hours (8 MB).
-
The description / page content is cleaned before rendering: no scripts, styles or style attributes, so the content cannot change how the rest of the PDF looks. It is styled only by the PDF's own print stylesheet (headings, lists, tables, status lozenges, code, panels, expands, done / open tasks), which keeps deeply nested content fast to render.
-
Every export checks that the user can still read the work item / page, as that user, before anything is loaded.
-
Confluence: images are downloaded through the REST attachment download, all labels are listed (also past the first batch), and table of contents links still lead to their headings.
-
Size limit 25 MB (property
ap.pdf.max-size-mb); at most 3 exports at once per backend instance; attachment downloads run on their own pool of 4 threads, and downloads not finished within 30 s are stopped and their images left out. -
PDFs are generated per request and not stored.
Approach
-
Approval Path had no HTML-to-PDF code. The PDF is a Freemarker HTML template rendered by openhtmltopdf (pure Java, on PDFBox), a new dependency.
-
Reused from Approval Path: the approvals, steps table, badges, deadline line and wording of the AP-1913 macro export (
PageApprovals, step rows,ExportFormat), now one implementation shared by the macro export and the PDF; the step tree model, shared by the PDF and the native page export;ApprovalStatusExportfor the inline status macros; the access checks of the work item panel; the base64 download of the CSV export; the dialog layout andToggleField; the field search, the reorderable field list and the field value formatting of the Approvals column editor and the CSV export. -
Reused from the shared libraries: guarana's ADF-to-HTML renderer (also used by the dashboard preview and document-sign), its ADF parser and the Jira media-to-attachment matcher; the Jira and Confluence clients.
-
Not reused, and why:
-
document-sign's
JiraIssuePdfRenderer/ConfluencePagePdfRendererprint through headless Chrome (Selenium + chromedriver), which needs a Chrome binary on the server; the Approval Path backend has none. Only the ADF rendering libraries they use are shared. -
guarana's
AdfHtmlImageInjector(used by document-sign) places images through CSScontent: url(...), which Chrome draws but openhtmltopdf ignores. The PDF uses its own image expander, which also checks type and size before downloading. -
The work item / page renderers behind the dashboard preview lay out for a browser (flexbox, scripts) that openhtmltopdf cannot render. The PDF uses only their ADF body rendering and its own details table.
-
The code of the external approver dashboard: it is built for a browser (flexbox, CSS variables, JavaScript charts), which the PDF engine cannot render.
-
-
Trade-off: no browser on the server, but less CSS than Chrome (no flexbox, no CSS variables), so the PDF uses its own print stylesheet instead of the ADF renderer's browser CSS.
Fixes included
-
Emoji names and emoji image addresses in ADF content were written into HTML without escaping (guarana
AdfToHtmlConverter, also used by the dashboard work item / page preview and other apps); they are escaped now. -
In dark mode, parallel step groups and AI Prompt step cards in an approvals list shown in a dialog (e.g. the Confluence page dialog) had the darker page background instead of the dialog's; they take the dialog background now.
-
The PDF export window keeps the same height while it loads and after it: no jump in Jira, no empty band in Confluence.
Decisions
-
The PDF contains the current approvals (not archived, not outdated; incomplete included; newest first; up to 100), the same set as the Approval summary macro shows.
-
The steps look like the app by default (tree) and the table is an option; the app's own step view is unchanged (leader and user, 2026-11-18).
-
The native page export, the PDF step (AP-541) and the list PDF with step details (AP-2368) follow the global setting; only the Export approvals to PDF dialog switches per export.
-
The native Confluence page export follows the PDF's tree as closely as Confluence's export format allows (order of name, lozenge and date, indented groups, export time first). An identical look would need the tree as an image, with text that cannot be selected or searched; not chosen (2026-11-20).
-
The code of the external approver dashboard is not reused for the step tree (see Approach).
-
Dates and wording follow the macro export: English formats with the time, in the exporting user's time zone.
-
The work item key and summary / page title are in the header and not repeated in the details table.
-
Details are off by default and the description / page content is on (leader's decision of 2026-11-17); comments are not part of the PDF.
-
Any work item field can be added, custom fields included, except the ones the PDF cannot show as text.
-
JSM customers cannot export; the action exists only in the agent's work item view.
-
Pages only: Confluence blog posts are not supported, as in the rest of the app.
-
In the tree a vote step shows its own title and "Voting group: <group>" under it, like the app; the table keeps "<group> (Vote)" as in the AP-1913 macro export (2026-11-19, after Mykhailo's review).
Out of scope
-
Templates and choosing a template at export time (later stage).
-
Automatic delivery (email, attachment) with the same content options: AP-541.
-
Comments in the PDF.
-
PDF export of the approvals lists (Approvals page, gadget table): AP-2368.
-
The native Confluence page export (PDF / Word) of the "Approval summary" and "Approval status" macros: delivered by AP-1913; this ticket only gives it the step layout of the PDF.
-
Confluence's "Export to Markdown": Confluence leaves app macros out of it and does not call the app, so approvals cannot appear there.
Acceptance criteria
-
"Export approvals to PDF" is available in the "..." menu of a work item and of a page, and as an icon at the right of the tabs while the Approvals tab is open, wherever the action is available.
-
The PDF contains, in order: header, approvals, work item / page details, description / page content.
-
The steps look like in the app by default and are a table when "Show steps as a table" is on, in the dialog or as the global setting.
-
Details are off and the description / page content is on by default; with both off, the PDF contains only the header and the approvals.
-
The details show the chosen fields in the chosen order, also added work item fields.
-
Works for one and for several approvals on one work item / page.
-
Exporting a Confluence page that embeds the "Approval summary" macro does not duplicate the approvals.
-
A user who cannot see the approvals of the work item / page cannot export them.
-
Each approval's name in the PDF links to that approval in the app (the work item or page with the approval in the Approval Path window), and the PDF title links to the work item or page.
-
Step decision and due dates and the approval's decision deadline, valid until and expired on show the time, in the time zone of the header, in the PDF and in the page export (PDF and Word) of the Approval summary macro.
Manual tester notes
-
Jira: open a work item with several approvals (one in progress with a group step, one approved) whose description has a pasted screenshot. "..." menu > "Export approvals to PDF": "Include details" is off and "Include description" is on. Switch "Include details" on > Export. The PDF shows the header, every approval with its steps, Details (type, status, priority, assignee, reporter, created, updated) and the description with the screenshot.
-
Same work item: switch both options off > Export. The PDF has only the header and the approvals.
-
Same dialog with "Include details" on: uncheck Priority, drag Updated to the top, and add a custom select field and a date field with "Add work item field" > Export. Details start with Updated, have no Priority and end with the two added fields and their values; an added field without a value shows "None". The "x" next to an added field removes it.
-
Type a text that matches no field into "Add work item field" and press Enter: the dialog stays open and nothing is exported.
-
A work item with a single approval: the PDF has no "Approvals" heading above it.
-
After Export the dialog shows "Approvals exported to PDF successfully" and closes.
-
A description with a task list (one task done, one open): the PDF shows a filled box for the done task and an empty box for the open one.
-
Jira, Approvals tab of the work item: an "Export to PDF" icon sits at the right of the New / Approvals / Activity tabs; the Activity tab shows none. It opens the same dialog as "..." > "Export approvals to PDF", without a scrollbar, with "Show steps as a table" off.
-
Export with "Show steps as a table" off: the steps look like in the app, with status circles and connector lines, indented group and vote members, a vote step under its title with "Voting group: <group>" below it, framed parallel groups (a custom-mode group with its progress rule and "Required" tags) and the steps after approval / rejection in their own box. Export again with the switch on: the steps are a table, and its header repeats on every page.
-
Settings > General > Exports (has the "New" badge): turn on "Show steps as a table", then open "..." > "Export approvals to PDF": the dialog starts with the switch on, and the export is a table. Turn the setting off again: the dialog starts with the switch off.
-
Jira: in the tree PDF every approver, group and vote member, moderator and delegate has a small round avatar left of the name; in Details with "Include details" on, Reporter, Assignee and a user picker field show the avatar. Email approvers and groups have none, and the names stay when an avatar is missing.
-
A long approval that fills several pages: no blank last page, no heading or approval title alone at the bottom of a page, and a step tree that breaks across pages ends its line at the last step.
-
Confluence: the "..." > Apps > "Export approvals to PDF" action and the "Export to PDF" icon of the Approvals tab open the same dialog of the same size, without a scrollbar with the details off; on a blog post the tabs show no icon. The PDF shows the steps with names and no avatars.
-
Confluence: export a page with an "Approval summary" macro whose approval has a parallel group to PDF and to Word with the native page export (open the Word file in Microsoft Word; LibreOffice shows Confluence's Word files with stray "=" characters). "Approval values as of the export" comes first, in grey; each step reads name, decision lozenge and date in grey, with the comment under it; a vote step's title has its voting group under it; group and vote members are indented under their step; the parallel group is its name in bold with its steps indented under it; no avatars or icons. Turn on "Show steps as a table" in Settings > General > Exports and export again: the macros show tables.
-
Jira: the dialog has no empty space under the buttons and no scrollbar, with the details off and on. Confluence: with the details off the dialog has no scrollbar; with the details on, the field list scrolls and Cancel / Export stay visible.
-
Click Export in Jira and in Confluence: the dialog keeps the same height while the export loads and after it (no jump in Jira, no empty band in Confluence).
-
Confluence: a page with an attached (pasted) image and a table of contents macro: the image is in the PDF and clicking a table of contents entry jumps to its heading.
-
Confluence: open a page with an "Approval summary" macro and inline "Approval status" macros. "..." > Apps > "Export approvals to PDF" > Export. The approvals appear once (Approvals section), the inline statuses are shown in the page content, and page tables have borders.
-
Confluence, "Include details" on: uncheck Version and drag Labels to the top > Export. Details start with Labels and have no Version.
-
A page with no approvals: the PDF says "No approvals on this page yet."
-
A Confluence blog post: "..." > Apps > "Export approvals to PDF" says "Approvals can be exported from pages only." and Export is off.
-
Work item whose description has a pasted screenshot and an image linked by URL: the screenshot is in the PDF, the linked image is not.
-
Repeat one export in Firefox and Safari: the PDF downloads and the dialog closes.
-
A user who cannot view approvals in the project / space does not see the action or the icon.
-
Dark mode, Confluence page dialog with an approval that has a parallel step group: the group has the same background as the rest of the dialog.
-
Jira: export a work item with an approval that has a decision deadline. The approval name in the PDF is a link that opens the work item with that approval in the Approval Path window; the PDF title opens the work item. Step dates and the decision deadline show the time, a due date reads like "Due Nov 20, 2026, 12:00", and the Date column of the steps table shows a date with time on one line.
-
Confluence: the same on a page (page PDF export): the approval name opens the page with that approval in the Approval Path window, and the dates show the time. Export a page with an "Approval summary" macro to PDF and Word with the native page export: the "Waiting for" due dates and the step dates show the time.
-
Blocked group decided by the starter: one group member approves and one rejects, then the starter decides the blocked group with a comment. In the tree PDF, the table PDF and the Confluence page export, the starter appears as one more entry after the members with the decision, date and comment, and the group line shows no comment.
Before release
-
Deploy the backend first, then the Jira and Confluence Forge apps: new
jira:issueActionandconfluence:contentActionmodules, no new scopes; the Confluence app manifest also changes the size of the PDF dialog. With the Forge apps first, the old frontend would open the wrong view in the new dialog. -
New column
global_settings.export_steps_layout(changesetexport-steps-layout); the jOOQ classes are hand-written as codegen would, to be regenerated and compared.