Merged
Conversation
This change adds detection for subtitle placeholders to make use of them on title slides instead of trying to locate shapes by index.
Contributor
There was a problem hiding this comment.
Pull request overview
Hotfix focused on improving report template robustness—especially PPTX export behavior when slide layouts don’t match expected placeholder structure—and preventing template-related errors when document type is unset.
Changes:
- Updated PPTX title slide generation to detect subtitle placeholders and place subtitle/date more intelligently.
- Added fallback behavior for missing PPTX placeholders to reduce template compatibility failures.
- Hardened template form/template selection behavior when
object/doc_typemay be unset.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| ghostwriter/reporting/templates/reporting/report_template_form.html | Avoids errors when object is falsy while checking if the template is a global default. |
| ghostwriter/reporting/models.py | Adds explicit handling for templates missing doc_type in exporter/lint paths. |
| ghostwriter/reporting/forms.py | Adjusts form cleaning to tolerate missing doc_type and makes doc_type required. |
| ghostwriter/modules/reportwriter/report/pptx.py | Switches several placeholder lookups to a safer fallback helper. |
| ghostwriter/modules/reportwriter/project/pptx.py | Introduces subtitle placeholder detection + a placeholder/textbox fallback helper used by PPTX exporters. |
| .gitignore | Ignores .gwcli-last-update-check. |
Comments suppressed due to low confidence (1)
ghostwriter/modules/reportwriter/report/pptx.py:41
get_placeholder_or_textbox()makes the body shape retrieval safer, but this slide still deletesshapes[1]when building the observations table. With templates/layouts that don't have the expected shape ordering/count,shapes[1]can be the wrong shape (or raiseIndexError), reintroducing the same template-compatibility failure. Delete the actual body shape you intended to replace (e.g., the shape returned for the body) or guard the deletion based on the shape you found/created.
body_shape = self.get_placeholder_or_textbox(shapes, 1)
title_shape.text = "Positive Observations"
text_frame = get_textframe(body_shape)
# If there are observations then write a table
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #833 +/- ##
=======================================
Coverage 91.39% 91.40%
=======================================
Files 370 370
Lines 20993 21033 +40
=======================================
+ Hits 19187 19225 +38
- Misses 1806 1808 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGELOG
[6.2.5] - 2 March 2026
Changed
Fixed