Skip to content

pages.updated_at should only be updated when a revision is made, or the page "Updated by" date should use the latest revision #1777

@stephen-hill-safe-uk

Description

@stephen-hill-safe-uk

Describe the bug
When a user changes the sort order of a page within a book or chapter, the pages.updated_at field is updated (the updated_by field is not updated).

When viewing the page in the browser, the pages.updated_at field is used to display when the page was last updates. After a sort, this will give the wrong impression of who and when the page was last updated.

In the below image, no page content was modified, and the displayed user "Stephen Hill" did not perform the sort.

Steps To Reproduce

  1. User "Abby" creates a new book with two pages.
  2. User "Bobby" sort/re-orders the pages within the book.
  3. The page displays that it was updated by Abby, on the datetime Bobby sorted the book.

Expected behavior

  • The entity-meta.blade.php and entity-export-meta.blade.php templates should be updated to use the datetime and user of the latest page revision for rendering the "entities.meta_updated_name" string. This would give a clear indication of who actually performed a meaningful update to the page.
  • Performing a sort should not update the pages.updated_at field.

Screenshots
entity-meta.blade.php output after the page was sorted. The last revision was over a year ago.
image

Your Configuration (please complete the following information):

  • BookStack v0.26.2
  • PHP 7.2.4
  • Hosting Method: FreeBSD Jail, Nginx, PHP-FPM

Many Thanks
Stephen

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions