[Bug 14367] New: History for MARC records. Roll back changes on a timeline or per field.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367 Bug ID: 14367 Summary: History for MARC records. Roll back changes on a timeline or per field. Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: gmcharlt@gmail.com Reporter: viktor.sarge@regionhalland.se QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Changes to MARC records are currently not tracked. We suggest creating functionality that tracks all changes to records and lets the users roll them back either in batch to a previous point in the history or separately for each field (so you can roll back changes to a field without changing fields that may have been changed after this one). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367 --- Comment #1 from Martin Persson <xarragon@gmail.com> --- Created attachment 41642 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41642&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 Test plan: * Log into OPAC, search for a title, chose 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@quecheelibrary.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367 Martin Persson <xarragon@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |xarragon@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 41642 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41642 Bug 14367: Add MARC record history Review of attachment 41642: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14367&attachment=41642) ----------------------------------------------------------------- ::: C4/Biblio.pm @@ +3531,4 @@
sub ModBiblioMarc { # pass the MARC::Record to this function, and it will create the records in # the marc field + my ( $record, $history, $biblionumber, $frameworkcode ) = @_;
Why would you add $history as a 2nd positional parameter here? Wouldn't it make more sense to add it as the 4th, so that you wouldn't affect any existing calls to ModBiblioMarc that don't require the history? I notice $history was added as the last positional parameter on other functions which use history, so doing that here would be more consistent as well... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 41642 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41642 Bug 14367: Add MARC record history Review of attachment 41642: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14367&attachment=41642) ----------------------------------------------------------------- ::: C4/Biblio.pm @@ +141,5 @@
&TransformHtmlToXml prepare_host_field ); + + # History functions
Are we adding new functions to C4::Biblio, or should these have gone into something like Koha::Metadata::History? ::: cataloguing/addbiblio.pl @@ +299,5 @@
my $index_subfield = CreateKey(); # create a specifique key for each subfield
+ my $taghistory = $history->{$tag}->{$subfield}; + if (defined $taghistory ) { + warn "TAG HIST: $tag/$subfield", Dumper($taghistory);
This looks like debugging code, no? @@ +523,4 @@
my @BIG_LOOP; my %seen; my @tab_data; # all tags to display + #print STDERR "usedTagsLibs: ", Dumper(@$usedTagsLib);
Also looks like debugging code -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367 jdemuth@roseville.ca.us <jdemuth@roseville.ca.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jdemuth@roseville.ca.us -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org