Open KylianvD opened 2 months ago
This one will likely require a quite difficult manual SQL query, since we do not even store what was filled in at an inventarisation explicitly. Some sort of clever double select query is required where the item_states belonging to the current inventarisation are joined to the previous item_state lines.
Since we have thousands of records in an inventarisation, we cannot get away with doing this in python code.
Note also that the system barely has a difference between an inventarisation being on-going and finished, with the only difference pretty much being that a finished inventarisation cannot be edited anymore.
A more proper way to fix this issue is to actually make that separation, but that likely requires us to implement some form of asynchronous mechanism to evaluate the inventarisation when it's finished.
^^ SPAM
After an inventarisation, it would be nice to be able to get a list of all books that have changed state in that inventarisation.