Skip to content

7103 - Shorten and order generated court reports - #7107

Open
Guflly wants to merge 1 commit into
rubyforgood:mainfrom
Guflly:7103-fix-court-report
Open

7103 - Shorten and order generated court reports#7107
Guflly wants to merge 1 commit into
rubyforgood:mainfrom
Guflly:7103-fix-court-report

Conversation

@Guflly

@Guflly Guflly commented Aug 8, 2026

Copy link
Copy Markdown

What github issue is this PR for, if any?

Resolves #7103

What changed, and why?

Court reports now omit unanswered sections and volunteer guidance by default. Both report dialogs include an opt-in checkbox for empty sections. Topic sections, org settings topics, and interviewed-person rows now use stable alphabetical grouping and ordering.

How is this tested? (please write rspec and jest tests!)

  • bundle exec rspec spec/models/case_court_report_context_spec.rb spec/services/case_contacts_contact_dates_spec.rb spec/models/case_court_report_spec.rb
  • Focused request specs for the report option and settings order
  • System expectations for both unchecked dialog checkboxes
  • Real DOCX rendering with the default, Montgomery, and Prince George templates
  • StandardRB and ERB Lint

Screenshots please :)

Not included; the checkbox follows the existing dialog field styling.

Feelings gif (optional)

@github-actions github-actions Bot added 🧪 Tests Tests ruby Touches Ruby code erb Touches ERB templates labels Aug 8, 2026
@compwron

Copy link
Copy Markdown
Collaborator

The failing brakeman check here isn't caused by this PR — it's the Weak-confidence EOLRails warning ("Support for Rails 8.0.5.1 ends on 2026-10-07"), which started failing every branch once the EOL window opened. It's already fixed on main in #7108, which added that fingerprint to config/brakeman.ignore.

Rebasing (or merging main) should turn brakeman green here — no changes needed to your commits.

@path_to_template = args[:path_to_template]
@court_date = args[:court_date] || @casa_case.next_court_date
@case_court_orders = args[:case_court_orders] || @casa_case.case_court_orders
@include_empty_topics = ActiveModel::Type::Boolean.new.cast(args[:include_empty_topics])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you explain your thinking on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

erb Touches ERB templates ruby Touches Ruby code 🧪 Tests Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: generated court report is bloated by unanswered topic sections (and its guidance text), and interviewee rows have no stable order

3 participants