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

Missing "status" database filter condition #81

Open
ghost opened this issue Nov 27, 2022 · 4 comments
Open

Missing "status" database filter condition #81

ghost opened this issue Nov 27, 2022 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@ghost
Copy link

ghost commented Nov 27, 2022

Hi,

looks like there are some database filters in Notion which are missing in the library. For example, there is no status filter condition inside notion.api.v1.model.databases.query.filter.condition

@seratch seratch added the enhancement New feature or request label Nov 29, 2022
@seratch seratch added this to the 1.7.2 milestone Nov 29, 2022
@seratch
Copy link
Owner

seratch commented Nov 29, 2022

Hi @lsimunec, thanks for flagging this. If I remember correctly, the filter condition for status properties was not a thing a few weeks ago (I did quick prototyping and it didn't work). Now the feature may be available on the Notion API side. If it's a thing already, I am happy to work on the change when I have time for this project. Contributions are greatly appreciated too

@TWiStErRob
Copy link
Contributor

TWiStErRob commented Dec 13, 2022

I was looking to add a value to a property which has Status type and it's not supported. So I guess in general the Status type support is missing @seratch?

Based on https://www.google.com/search?q=status+column+notion the Status property type was added in 2022 June, docs: https://www.notion.so/help/guides/status-property-gives-clarity-on-tasks. But this is a backwards-compatible change, so full support for https://developers.notion.com/changelog/releasing-notion-version-2022-06-28 is not necessary to resolve this.

@TWiStErRob
Copy link
Contributor

TWiStErRob commented Dec 13, 2022

An implementation thing to prepare for future similar changes like this:
I was getting an NPE when reading from prop: DatabaseProperty like when (prop.type) (type is non-nullable, but contains null). This is because GSON will deserialize null for enums reflectively when it doesn't find a matching serialized name. This is one of the reasons why we usually shouldn't mix serialization (allows null) and domain level (no nulls) classes. In this library that is not really feasible, so a custom type adapter and an "Unknown" type might help: google/gson#608 (comment)

@TWiStErRob
Copy link
Contributor

Ah accidentally saw you were trying https://github.com/seratch/notion-sdk-jvm/tree/status-prop-wip :)

@seratch seratch modified the milestones: 1.7.2, 1.x, 2.x Jan 29, 2023
whatasame added a commit to whatasame/notion-sdk-jvm that referenced this issue May 31, 2023
whatasame added a commit to whatasame/notion-sdk-jvm that referenced this issue Jun 7, 2023
@seratch seratch reopened this Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants