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

Using rawFilter on a status property type returns a validation error #90

Open
farez opened this issue Dec 2, 2022 · 6 comments
Open
Labels
bug Something isn't working currently not supported Due to a updated dependency, this feature is currently not supported or is not working

Comments

@farez
Copy link
Contributor

farez commented Dec 2, 2022

Describe the bug

When I use Filter::rawFilter to query a Notion database on a status property type, a validation error is returned.

To Reproduce

Set the filter and send the query:

$filters = new Collection();
$filters->add(Filter::rawFilter("Status",
["status" => [Operators::EQUALS => "Ready"]]
));

$notion = new Notion($access_token)

$rows = $notion->database($id)
->filterBy($filters)
->sortBy($sortings)
->query()
->asCollection();

Expected behavior

A filtered results collection is returned.

Exceptions

Trace can be found here: https://flareapp.io/share/pPv1vqYm#F58

Additional context

Screenshot 2022-12-02 at 11 22 46 PM

@mechelon
Copy link
Member

mechelon commented Dec 7, 2022

Thanks for pointing this out, I could reproduce the error.
This is because we are using an older endpoint of the Notion API until now, and status properties came after that. We are working on a concept to allow the usage of different versions of the endpoint, but that makes (automated) testing quite complicated and takes some time.

@mechelon mechelon added the bug Something isn't working label Dec 7, 2022
@johguentner johguentner added the currently not supported Due to a updated dependency, this feature is currently not supported or is not working label Dec 7, 2022
@farez
Copy link
Contributor Author

farez commented Jun 26, 2023

No worries. And thanks so much for looking into this.

@ren0v
Copy link

ren0v commented Jul 16, 2023

hi @mechelon , do you think this is something that will be supported by your next release? how can we help you for supporting more recent api endpoint?

@johguentner
Copy link
Member

Hi @ren0v,
we basically need to check all implemented API-Endpoints against the currenct version. There were some breaking changes and we want to make sure we don't break any existing functionality.

We have a new test implementation to better test real API-Endpoint and not faked content, however it will take some time to rewrite all existing tests towards that. Hopefully we can finish that up at around August.

@kasperhartwich
Copy link

You should write at notice this i your README, so we don't spend time on debugging into this. 🤔

@roygroothulze
Copy link

Is there any vision on when this will get fixed? Would like to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working currently not supported Due to a updated dependency, this feature is currently not supported or is not working
Projects
None yet
Development

No branches or pull requests

6 participants