Skip to content

Propagating datetime of last update on ancestors #1157

@sampaccoud

Description

@sampaccoud

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
When a sub-document is updated, the parent document "updated_on" datetime does not change. As a result, the parent document does not get promoted on top of the list view for users having access to it.

Describe the solution you'd like

  • Add a field "descendants_updated_on" to the Document model.
  • When a document is updated, set its field '"updated_on" and set the field "descendants_updated_on" on all the document's ancestors.
  • Sort documents in the list view by the value of the "descendants_updated_on" field.

Describe alternatives you've considered
We could skip adding a new field "descendants_updated_on" and force the value of the "updated_on" field on ancestors when a sub-document is updated.
Or we could compute the value of the "updated_on" field but I think this would have an impact on performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureadd a new feature

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions