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

Multiple sort options in combinations with cursor fails. Invalid handling of comma. #1797

Closed
alstanchev opened this issue Nov 8, 2023 · 2 comments · Fixed by #1799
Closed
Assignees
Labels
Milestone

Comments

@alstanchev
Copy link
Contributor

A search query that uses nore than one sort property is not handled properly sort(-attributes/type,+features/some),size(200),cursor(...).

In the case where there is no cursor there is no error. But in case a cursor is included the problem manifests.

In ThingSearchRoute in the calculateOptions method options are parsed by comma which leads to incorectly dividing the sort part and leading to
{ "status": 400, "error": "thing-search:search.option.invalid", "message": "Invalid input '+', expected Sort, Limit, Cursor or Size (line 1, column 35):\nsort(-/attributes/type,+/thingId),+thingId),size(2),cursor(....)\n, "description": "At least one provided option is invalid." }

@alstanchev alstanchev self-assigned this Nov 8, 2023
@alstanchev alstanchev added the bug label Nov 8, 2023
@alstanchev alstanchev added this to the 3.4.1 milestone Nov 8, 2023
@thjaeckle
Copy link
Member

@alstanchev do you expect to provide a fix soon? #1798 is really a blocker for us, so I would want to quickly build a 3.4.1 bugfix release.

@alstanchev
Copy link
Contributor Author

Yes, it is ready. Just want to wait for the system tests to be sure. Will push it tomorrow.

@thjaeckle thjaeckle moved this to Waiting for Approval in Ditto Planning Nov 8, 2023
@github-project-automation github-project-automation bot moved this from Waiting for Approval to Done in Ditto Planning Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants