Update revision data on save

Created on 19 June 2023, over 1 year ago
Updated 21 September 2023, about 1 year ago

Problem/Motivation

Currently, when bulk updating nodes, new revisions are created, but they do not have a new timestamp.

MySQL [db]> select nid,vid,revision_uid,revision_timestamp from node_revision where nid=664 ORDER BY vid;

+-----+--------+--------------+--------------------+
| nid | vid    | revision_uid | revision_timestamp |
+-----+--------+--------------+--------------------+
| 664 | 342474 |            0 |         1621510523 |
| 664 | 342491 |         2227 |         1621518144 |
| 664 | 342531 |         2193 |         1621530540 |
| 664 | 435482 |         2193 |         1658507846 |
| 664 | 435483 |         2193 |         1658507921 |
| 664 | 435670 |         2227 |         1658778659 |
| 664 | 532836 |         2227 |         1658778659 |
| 664 | 540196 |        18075 |         1682095763 |
| 664 | 540316 |         2227 |         1682104179 |
| 664 | 540521 |        19906 |         1682111230 |
| 664 | 547206 |        18075 |         1682977058 |
| 664 | 547236 |        18075 |         1682981513 |
| 664 | 548841 |         2227 |         1683122014 |
| 664 | 549076 |        19891 |         1683131477 |
| 664 | 549381 |         2227 |         1683144076 |
| 664 | 549471 |         2176 |         1683146528 |
| 664 | 549481 |         2176 |         1683146780 |
| 664 | 576761 |        19891 |         1686857032 |
| 664 | 576896 |         2227 |         1686864229 |
| 664 | 576926 |        19906 |         1686864774 |
| 664 | 576977 |        19906 |         1686864774 |
| 664 | 577061 |        19906 |         1686864774 |
| 664 | 577063 |        19906 |         1686864774 |
| 664 | 577066 |        19906 |         1686864774 |
+-----+--------+--------------+--------------------+

These last 4 entries were all made via this module.

Steps to reproduce

Update a node that has revisions enabled several times.
Note that the Revisions tab doesn't reflect the time and user who made the revision

Proposed resolution

Update revision timestamp
Update revision user
Add default update message (something like "Updated fields X by user Y"

Remaining tasks

Implement the above

User interface changes

None

API changes

None

Data model changes

None. Just following core's data model.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States agentrickard Georgia (US)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024