Skip to content

fix: minor fixes for client side datasets api migration v3 to v4 - #2947

Open
Junjiequan wants to merge 4 commits into
masterfrom
prep-for-client-migration-dataset-v3-to-v4
Open

fix: minor fixes for client side datasets api migration v3 to v4#2947
Junjiequan wants to merge 4 commits into
masterfrom
prep-for-client-migration-dataset-v3-to-v4

Conversation

@Junjiequan

@Junjiequan Junjiequan commented Sep 8, 2026

Copy link
Copy Markdown
Member

Description

  • v4 datasets.findAll takes raw mongo operators, but JSON has no date type, so the client sends {$gte: {$date: "..."}}. nothing converts that marker, so it reached mongo as a plain object instead of a Date and the filter matched nothing. castWhereFilter converts it before the pipeline runs, and is written as a marker map so other extended json types can be added later
  • add date.begin and date.end only when a value is provided
  • added 3 allowed filter keys to keep the query consistent with v3 behavior: $text, $search, $date

Additional bug fix:

  • fixed a param name mismatch between @ApiParam and the route on the attachment delete endpoint, which was generating a not needed required id field in the sdk

Motivation

Fixes

  • Bug fixed (#X)

Changes:

  • changes made

Tests included

  • Included for each change/fix?
  • Passing?

Documentation

  • swagger documentation updated (required for API changes)
  • official documentation updated

official documentation info

Summary by Sourcery

Fix dataset filter handling and attachment API metadata for the v3-to-v4 client migration.

Bug Fixes:

  • Convert extended JSON date markers in dataset filters into BSON dates so date-based queries work correctly.
  • Allow partial date ranges by only applying provided begin and end bounds.
  • Correct the attachment deletion API parameter metadata to match the route and prevent an extraneous SDK field.

Enhancements:

  • Expand supported dataset filter operators to preserve v3-compatible query behavior.

@Junjiequan
Junjiequan requested a review from a team as a code owner September 8, 2026 07:47
@Junjiequan
Junjiequan force-pushed the prep-for-client-migration-dataset-v3-to-v4 branch from ca12ad9 to a6405a4 Compare September 8, 2026 07:47

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@Junjiequan
Junjiequan force-pushed the prep-for-client-migration-dataset-v3-to-v4 branch from 38439f4 to cfbed7f Compare September 9, 2026 07:32
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