[Koha-bugs] [Bug 14367] History for MARC records. Roll back changes on a timeline or per field.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Apr 26 04:11:28 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia <aleisha at catalyst.net.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #84841|0                           |1
        is obsolete|                            |

--- Comment #22 from Aleisha Amohia <aleisha at catalyst.net.nz> ---
Created attachment 88827
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88827&action=edit
Bug 14367: Add MARC record history

This is a proof-of-concept implementation for adding history
support to MARC records. Every time a change is made a complete
copy of the record is stored along with the date/time and user
identity. The changes are listed under each field in the MARC
record editor and can be reverted with a click.

The changes are stored as a JSON array in a new column named
'history' in the database. The array is re-read from the database
before updating the record to prevent old data lingering in
the session from overwriting newer changes made by other users.

If we decide to implement this feature it might be better to
simply create a new table altogether and link it rather than
the clumsy JSON solution. That would eliminate a lot of bulky
code that transforms MARC-KOHA-JSON and back while ensuring
data integrity.

Also, there are plans to add permissions to the MARC records;
this likely requires more complex interactions that will scale
badly with the current JSON solution.

At present, the history is hardcoded to 10 entries.
This can easily be made into a syspref.

The current implementation should probably be refactored
into a 'BiblioHistory' class before deploying.

Documentation of the functions/methods are also needed.

Icon is ugly and needs to be improved.

Sponsored-By: Halland County Library & Catalyst IT

Test plan:
* Run updatedatabase.pl
* Log into Staff interface, search for a title, choose to edit it's MARC
record.
* Chose a MARC field and modify it, press Save.
* Open the MARC editor again for the same title.
* Next to the edited field a new icon should appear, looking like
  a clock face with a encircling arrow; the history icon.
* Clicking the icon should open a table showing all changes done
  to the record, including value change, date/time and user name.
* Clicking a record in the history log should revert that field to the
  clicked value (a previous value)
* Run prove t/db_dependent/BiblioHistory.t and confirm all tests pass

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list