10000 rollup property filters accept `rich_text` instead of `text`. · Issue #247 · notion-dotnet/notion-sdk-net · GitHub
[go: up one dir, main page]

Skip to content
rollup property filters accept rich_text instead of text. #247
Closed
@KoditkarVedant

Description

@KoditkarVedant

Rollup property filters must now be constructed with the rich_text keyword instead of the text keyword if the value of the rollup is an array of rich_text.

Put concretely, if a page's rollup property is rendered like so:

"rollup property": {
    "id": "~%5Bw%5C",
    "type": "rollup",
    "rollup": {
        "type": "array",
        "array": [
            {
                "type": "rich_text",
                "rich_text": [
                    {
                        "type": "text",
                        "text": {
                            "content": "update text 2",
                            "link": null
                        },
                        "annotations": {
                            "bold": true,
                            "italic": false,
                            "strikethrough": false,
                            "underline": false,
                            "code": false,
                            "color": "red"
                        },
                        "plain_text": "update text 2",
                        "href": null
                    }
                ]
            },
            {
                "type": "rich_text",
                "rich_text": [
                    {
                        "type": "text",
                        "text": {
                            "content": "another text",
                            "link": null
                        },
                        "annotations": {
                            "bold": false,
                            "italic": false,
                            "strikethrough": false,
                            "underline": false,
                            "code": false,
                            "color": "default"
                        },
                        "plain_text": "another text",
                        "href": null
                    }
                ]
            }
        ],
        "function": "show_original"
    }
}

This filter will no longer work in version 2022-02-22:

{
    "filter": {
        "property": "rollup property",
        "rollup": {
            "any": {
                "text": {
                    "contains": "update text"
                }
            }
        }
    }
}

Instead, write:

{
    "filter": {
        "property": "rollup property",
        "rollup": {
            "any": {
                "rich_text": {
                    "contains": "update text"
                }
            }
        }
    }
}

Notion changelog: https://developers.notion.com/changelog/releasing-notion-version-2022-02-22

Metadata

Metadata

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0