-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.6
-
Fix Version/s: 5.6.0-HF09, 5.7.1
-
Component/s: Core
There are several operations that do a checkin or checkout, but they don't all emit the same set of events.
- saveDocument() with versioning option sends:
beforeDocumentModification, documentCheckedIn, documentCreated, documentModified - publishDocument() sends:
documentCheckedIn, documentCreated (version), documentCreated (proxy), documentProxyPublished, sectionContentPublished - restoreToVersion() when creating a snapshot sends:
beforeRestoringDocument, documentRestored - checkIn() sends:
aboutToCheckIn, documentCreated, documentCheckedIn, documentCreated - checkOut() sends:
aboutToCheckout, documentCheckedOut
What we want is:
- for a checkin, send at least aboutToCheckIn, documentCheckedIn, documentCreated,
- for a checkout, send at least aboutToCheckout, documentCheckedOut.
So:
- saveDocument() with versioning option should send aboutToCheckIn,
- saveDocument() when doing autocheckout in presave should send aboutToCheckout, documentCheckedOut,
- publishDocument() should send aboutToCheckIn,
- publishDocument() when checking out (when called on a checked in doc with all removed versions) should send aboutToCheckout, documentCheckedOut,
- restoreToVersion() should send aboutToCheckIn, documentCreated, documentCheckedIn,
- restoreToVersion() when not skipping checkout should also send aboutToCheckout, documentCheckedOut,
- checkIn() should not send documentCreated twice (introduced by
NXP-8949which fixed another event imbalance).
This inconsistency has an impact on services like Quota which depend on some events to be present in a consistent manner.