Skip to content

Parse Solr facet range date and time with proper format#11194

Merged
tdonohue merged 1 commit intoDSpace:mainfrom
danielcoelhocgu:fix-11192
Aug 25, 2025
Merged

Parse Solr facet range date and time with proper format#11194
tdonohue merged 1 commit intoDSpace:mainfrom
danielcoelhocgu:fix-11192

Conversation

@danielcoelhocgu
Copy link
Copy Markdown
Contributor

References

Description

When running solr-export-statistics CLI command with no arguments, it queries Solr to get the available date ranges in the index. When parsing these date values, an exception is being thrown due to a format mismatch. This PR fixes this bug.

Instructions for Reviewers

Changes were made to the command on this commit.
Now I just added an explicit DateTimeFormatter to the YearMonth.parse method call.

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
  • My PR passes Checkstyle validation based on the Code Style Guide.
  • My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
  • My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR modifies REST API endpoints, I've opened a separate REST Contract PR related to this change.
  • If my PR includes new configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@tdonohue tdonohue added bug 1 APPROVAL pull request only requires a single approval to merge. component: statistics Related to Statistics (Solr or Google Analytics) interface: command-line DSpace CLI (command-line interface) port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release labels Aug 25, 2025
@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release Aug 25, 2025
@tdonohue tdonohue self-requested a review August 25, 2025 14:29
Copy link
Copy Markdown
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @danielcoelhocgu ! Verified the bug & verified this PR fixes it.

@github-project-automation github-project-automation Bot moved this from 🙋 Needs Reviewers Assigned to 👍 Reviewer Approved in DSpace 10.0 Release Aug 25, 2025
@tdonohue tdonohue added this to the 10.0 milestone Aug 25, 2025
@tdonohue tdonohue merged commit b268eb3 into DSpace:main Aug 25, 2025
27 checks passed
@github-project-automation github-project-automation Bot moved this from 👍 Reviewer Approved to ✅ Done in DSpace 10.0 Release Aug 25, 2025
@dspace-bot
Copy link
Copy Markdown
Contributor

Successfully created backport PR for dspace-9_x:

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

Labels

1 APPROVAL pull request only requires a single approval to merge. bug component: statistics Related to Statistics (Solr or Google Analytics) interface: command-line DSpace CLI (command-line interface) port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Error when running solr-export-statistics command

3 participants