Skip to content

Hotfix: Report template fixes#833

Merged
chrismaddalena merged 31 commits intomasterfrom
hotfix/report-template-fixes
Mar 3, 2026
Merged

Hotfix: Report template fixes#833
chrismaddalena merged 31 commits intomasterfrom
hotfix/report-template-fixes

Conversation

@chrismaddalena
Copy link
Copy Markdown
Collaborator

@chrismaddalena chrismaddalena commented Mar 2, 2026

CHANGELOG

[6.2.5] - 2 March 2026

Changed

  • Changed PowerPoint title slide generation to detect subtitle placeholders for more intelligent subtitle placement
  • Document type is now a required field for the report template form to prevent issues with that field being forgotten

Fixed

  • Fixed PowerPoint generation failing with some templates when slide layout content did not match expectation
  • Fixed domain and server history not properly showing the "Checked Out By" column
  • Fixed updating a domain or serevr checkout setting the user value to null

Copilot AI review requested due to automatic review settings March 2, 2026 22:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_type may 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 deletes shapes[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 raise IndexError), 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

Comment thread ghostwriter/reporting/forms.py
Comment thread ghostwriter/modules/reportwriter/report/pptx.py
Comment thread ghostwriter/reporting/models.py
Comment thread ghostwriter/reporting/forms.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Comment thread ghostwriter/modules/reportwriter/project/pptx.py Outdated
Comment thread ghostwriter/modules/reportwriter/project/pptx.py Outdated
Comment thread ghostwriter/modules/reportwriter/report/pptx.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated 10 comments.

Comment thread ghostwriter/shepherd/tests/test_views.py Outdated
Comment thread ghostwriter/shepherd/templates/shepherd/domain_detail.html Outdated
Comment thread ghostwriter/rolodex/templates/rolodex/project_detail.html Outdated
Comment thread ghostwriter/rolodex/templates/rolodex/project_detail.html Outdated
Comment thread ghostwriter/shepherd/views.py Outdated
Comment thread ghostwriter/rolodex/templates/snippets/server_checkout_detail_modal.html Outdated
Comment thread ghostwriter/shepherd/templates/shepherd/server_detail.html Outdated
Comment thread CHANGELOG.md Outdated
Comment thread ghostwriter/shepherd/views.py
Comment thread ghostwriter/shepherd/tests/test_views.py Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 82.35294% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.40%. Comparing base (75cc318) to head (dec3dd4).
⚠️ Report is 32 commits behind head on master.

Files with missing lines Patch % Lines
ghostwriter/reporting/models.py 28.57% 5 Missing ⚠️
ghostwriter/reporting/forms.py 42.85% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chrismaddalena chrismaddalena merged commit a2a926e into master Mar 3, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants