How to get oldValue from IObjectModifiedEvent

Is there any way to get old value of a field from IObjectModifiedEvent event object?

Tried event.descriptions[0].attributes but only give tuple of updated fields.

Using Plone4 and dexterity. Thanks in advance.

Rough blueprint:

  • you need to get hold of the original state of the published object by registering a handler for ZPublisher.pubevents.PubAfterTraversal or implement that some handler for a related traversal event
  • inside this handler you can get hold of all related values from fields - either in a generic way that deals with fields defined by the model of a content types + fields introduced through attached behaviors or some hardcoded value extraction
  • attach the original data to the REQUEST
  • inside the IObjectModifiedEvent handler you do the same value extraction for the new state and compare the values against the stored original data