Responsible: Kostis Pristouris
Background
As part of the deck model we define a model for storing the changes applied to the deck after each save or other action on the UI that results to a deck change, with or without creating a new revision. See also
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
The change log is defined as an array of change log records that include at least the timestamp and the user performing the deck change. This array is stored in the changeLog
attribute inside a deck revision subdocument in mongo db.
...
We extend the deck revision model to additionally hold a changeLog
attribute which is an array of Deck Change elements.
Deck Change=
property | type | required | format | description |
---|---|---|---|---|
operation | string | yes | one of 'update', 'remove', 'insert' | |
timestamp | date string | yes | iso date string | |
user | integer | yes | ||
index | integer | if operation is 'remove' or 'insert' | ||
before | PropertiesPatch | if operation is 'update' and index is not set | provides the patch to be performed to the deck properties to undo the change | |
after | PropertiesPatch | if operation is 'update' and index is not set | provides the patch to be performed to the deck properties to apply the change | |
insert | ContentItem | if operation is 'insert' | provides the deck/slide reference of the item inserted | |
remove | ContentItem | if operation is 'remove' | provides the deck/slide reference of the item removed | |
update | ContentItemUpdate | if operation is 'update' and index is set | provides the undo/redo patches for the update to the contentItem |
The following object includes a subset of deck properties definitions, which includes all the deck properties that are user-defined and editable. Any of the properties are optional in this model but at least one should be defined.
PropertiesPatch=
property | type | required | format | description |
---|---|---|---|---|
title | no | same definition as "title" on the deck revision model | ||
language | no | same definition as "language" on the deck revision model | ||
theme | no | same definition as "theme" on the deck revision model | ||
license | no | same definition as "license" on the deck model | ||
description | no | same definition as "description" on the deck model |
ContentItemUpdate=
property | type | required | description |
---|---|---|---|
before | ContentItemPatch | yes | provides the patch to undo the content item change in parent deck change object |
after | ContentItemPatch | yes | provides the patch to apply the content item change in parent deck change object |
ContentItemPatch=
property | type | required | format | description |
---|---|---|---|---|
kind | same definition as "kind" on the ContentItemmodel | |||
ref | same definition as "ref" on the ContentItemmodel, but only "revision" can be set (no "id") |