Skip to content

Add history filtering - #31

Merged
alexsilaghi merged 1 commit into
main-whofrom
history-summary-search
Dec 12, 2025
Merged

Add history filtering#31
alexsilaghi merged 1 commit into
main-whofrom
history-summary-search

Conversation

@matthewhorridge

Copy link
Copy Markdown
Contributor

Handles an extra filter field in the request to get the history for a project. This is implemented as a simple case insensitive contains search that could be evolved in the future to something more complex.

@matthewhorridge matthewhorridge changed the title Implementation of https://github.com/who-icatx/icatx-project/issues/233 Add history filtering Dec 11, 2025

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 71 to +74
null,
null,
0,
null,
new Document("summary", filter),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Filter constrains whole projectChange document

The new filter is applied by setting projectChange on the probe to new Document("summary", filter) without ignoring the rest of that embedded document (lines 70‑74). In Spring Data MongoDB, org.bson.Document is treated as a simple subdocument, so the example query becomes {projectChange: {summary: <filter>}}. Because each stored revision’s projectChange (built in RevisionEventMapper) contains many other fields, that equality never matches, so any request that supplies a filter (or omits it and leaves it null/empty) will return an empty page even when revisions exist. The query needs to target projectChange.summary without requiring the entire subdocument to equal the single-field probe.

Useful? React with 👍 / 👎.

@alexsilaghi
alexsilaghi merged commit c24557e into main-who Dec 12, 2025
1 check 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.

2 participants