History - OpenSlides/OpenSlides GitHub Wiki

The datastore has a field information for each position (which, in turn, holds multiple events). This field can theoretically be filled arbitrarily by the backend. There are currently two ways to fill it which the client can handle:

  • Array-style (deprecated): An array of strings which represent the different changes at this position. Placeholders in the form of {} are supported and are replaced with the following item in the array. Example: ["State set to {}", "motion_state/1"] The entries are shown in the history of all models which are modified at this position.
  • Dictionary-Style: A dict which maps fqids to the array-styled entries. This allows for more flexibility and specificity when defining the history entries. Example: {"motion/1": ["Motion created"]}

Fqids inside the array which are used as replacements for placeholders are replaced in the client with the respective model's title. So the array-style example above would be translated to e.g. State set to accepted.

Some history informations should be shown for models which are not modified in the position in question, e.g. if a poll is reset, it should be shown in the content object's (motion or assignment) history page, but the content object itself is not changed by the events. In this case, a dummy event updating the id of the model (in this case the content object) is inserted, which just sets the id to the same value as before.

The client can access this history information for a specific fqid via the presenter get_history_information. The backend returns a list of all positions in which the fqid was changed by an event and the field informations is not empty. The content of the field is not evaluated, since the datastore is agnostic regarding its contents, so there might be history informations returned which do not contain the requested fqid in the history dictionary.

⚠️ **GitHub.com Fallback** ⚠️