Add history filtering - #31
Conversation
There was a problem hiding this comment.
💡 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".
| null, | ||
| null, | ||
| 0, | ||
| null, | ||
| new Document("summary", filter), |
There was a problem hiding this comment.
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 👍 / 👎.
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.