Skip to content

Fix AO loading when AO issue date is empty or null - #7197

Open
patphongs wants to merge 1 commit into
developfrom
feature/6601-fix-ao-null-issue-date
Open

Fix AO loading when AO issue date is empty or null#7197
patphongs wants to merge 1 commit into
developfrom
feature/6601-fix-ao-null-issue-date

Conversation

@patphongs

Copy link
Copy Markdown
Member

Summary

Handles advisory opinions when issue_date is empty or null.

This updates AO document sorting and date display so pages do not fail when a final opinion has no issue_date. In those cases, the AO page and AO search results display Not dated.

Required reviewers

1 engineer

Impacted areas of the application

General components of the application that this PR will affect:

  • Advisory opinion individual pages
  • Advisory opinion search results
  • Advisory opinion table sorting

How to test

  • Run pytest
    • test_sort_ao_documents_handles_missing_issue_date covers an AO with issue_date: None and a final opinion document, confirming document sorting does not fail.
    • test_advisory_opinion_page_handles_missing_issue_date covers an AO with issue_date: '' and a final opinion document, confirming the AO page renders and displays Not dated.
  • Run npm run build-js

There does not appear to be an example in the current data of a final opinion with no issue_date. The new legal tests covers that case directly, including the document sorting in the AO table and final opinion date display on the individual AO page.

@patphongs patphongs moved this to 👀 Ready in Website project Aug 3, 2026
@patphongs patphongs added this to the 32.5 milestone Aug 3, 2026
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.73%. Comparing base (efe5dc3) to head (e24e5f6).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7197      +/-   ##
===========================================
+ Coverage    79.45%   79.73%   +0.27%     
===========================================
  Files          256      256              
  Lines         6738     6756      +18     
===========================================
+ Hits          5354     5387      +33     
+ Misses        1384     1369      -15     

☔ View full report in Codecov by Harness.
📢 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.

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

Projects

Status: 👀 Ready

Development

Successfully merging this pull request may close these issues.

AO does not load when issue_date is empty

1 participant