laravel-notion-api icon indicating copy to clipboard operation
laravel-notion-api copied to clipboard

Using rawFilter on a status property type returns a validation error

Open farez opened this issue 2 years ago • 6 comments

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

farez avatar Dec 02 '22 15:12 farez

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 avatar Dec 07 '22 09:12 mechelon

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

farez avatar Jun 26 '23 10:06 farez

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?

ren0v avatar Jul 16 '23 18:07 ren0v

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.

johguentner avatar Jul 18 '23 15:07 johguentner

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

kasperhartwich avatar Jan 17 '24 16:01 kasperhartwich

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

roygroothulze avatar Jun 10 '24 07:06 roygroothulze