Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4487 Fixed entry_date_filed display on RECAP Search results #4488

Merged
merged 3 commits into from
Sep 24, 2024

Conversation

albertisfu
Copy link
Contributor

This PR fixes #4487. The issue was that child documents from ES are strings, so they need to be converted to date objects before formatting. The previous approach was weak because it only extracted the day and appended th to it.

Now, the code relies on Django's built-in date_filter, which properly formats dates following English rules (1st, 2nd, 3rd, 4th, and so on). It also fixes the issue of adding a leading zero to days less than 10.

Copy link
Member

@mlissner mlissner left a comment

Choose a reason for hiding this comment

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

Glad we're catching this.

@mlissner
Copy link
Member

This is set for auto-merge, but tests are failing. Feel free to merge once they're happy. :)

@albertisfu
Copy link
Contributor Author

I fixed the test related to factories.

However, I also saw this test also randomly failing: test_docket_and_docket_entry_already_exist.
I'll describe it in detail in a separate issue.
Merging this one.

@albertisfu albertisfu merged commit 5f168d2 into main Sep 24, 2024
13 checks passed
@albertisfu albertisfu deleted the 4487-fix-entry-date-filed-display-search-results branch September 24, 2024 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Days less than 10 display weird in search results
2 participants