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

2019-02-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

  Attachment #56613|0   |1
is obsolete||

--- Comment #17 from Aleisha Amohia  ---
Created attachment 84841
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84841&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.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2019-02-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

  Attachment #64243|0   |1
is obsolete||

--- Comment #18 from Aleisha Amohia  ---
Created attachment 84842
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84842&action=edit
Bug 14367: [FOLLOW-UP] Fixing merge conflicts...

...and other fixes to make patch work.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2019-02-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 CC||alei...@catalyst.net.nz
   Assignee|xarra...@gmail.com  |alei...@catalyst.net.nz

--- Comment #19 from Aleisha Amohia  ---
Rebased

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2019-02-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2019-02-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

  Change sponsored?|--- |Sponsored

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2019-02-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #20 from Aleisha Amohia  ---
Created attachment 84859
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84859&action=edit
Bug 14367: (follow-up) Rebasing to make patch work on master

Run through test plan and confirm everything still works as expected.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2018-04-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Chris Cormack  changed:

   What|Removed |Added

 Status|Patch doesn't apply |ASSIGNED
 CC||ch...@bigballofwax.co.nz

--- Comment #16 from Chris Cormack  ---
I am going to be working on this over the next few months

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Eric  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply
 CC||eric.gosseli...@gmail.com

--- Comment #7 from Eric  ---
Patch didn't apply in the sandboxes.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #8 from Eric  ---
(In reply to Eric from comment #7)
> Patch didn't apply in the sandboxes.

Auto-merging koha-tmpl/intranet-tmpl/prog/js/cataloging.js
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/css/addbiblio.css
CONFLICT (content): Merge conflict in
koha-tmpl/intranet-tmpl/prog/css/addbiblio.css
Auto-merging cataloguing/addbiblio.pl
Auto-merging C4/Biblio.pm
CONFLICT (content): Merge conflict in C4/Biblio.pm
Patch failed at 0001 Bug 14367: Add MARC record history
The copy of the patch that failed is found in: .git/rebase-apply/patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-04-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Chris  changed:

   What|Removed |Added

 CC||ksade...@gmail.com

--- Comment #9 from Chris  ---
I like the idea of storing history with timestamp and author. But storing whole
record seems like overkill to me. Especially for huge libraries.

So instead of whole history, just a "delta" of data changed (somewhat git does)
and as mentioned - not JSON but TABLE.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-04-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #10 from David Cook  ---
(In reply to Chris from comment #9)
> I like the idea of storing history with timestamp and author. But storing
> whole record seems like overkill to me. Especially for huge libraries.
> 
> So instead of whole history, just a "delta" of data changed (somewhat git
> does) and as mentioned - not JSON but TABLE.

I like the idea of storing deltas, although I wonder what that looks like in
practice.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-04-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #11 from David Cook  ---
(In reply to Chris from comment #9)
> I like the idea of storing history with timestamp and author. But storing
> whole record seems like overkill to me. Especially for huge libraries.
> 
> So instead of whole history, just a "delta" of data changed (somewhat git
> does) and as mentioned - not JSON but TABLE.

After doing some reading, it appears that Git actually does save the whole file
during a commit. It will compress it using zlib, but it stores the whole file.
However, when it does its garbage collection, it may discard old whole files
and replace them with deltas for more efficient storage.

Using Compress::Zlib, which is a core Perl module, I compressed a 6.7KB 153
line MARCXML file to 1.3KB. 

Let's say we have 1,000,000 old versions... that's 976MB or .95GB. Not super
huge but not tiny either. 

If we used GNU diff/patch or even 'git diff --no-index file1 file2', we could
get diffs and store those. Using diff, I made a 467B patch for a one line
change, and with git diff I got a 474B patch for the same one line change. 

Presuming 1,000,000 uncompressed patches of the same size, that's 445MB or
.434GB.

If you compress the patch, you can get it down to 227B, so 216MB or .211GB for
1,000,000 compressed patches. That seems pretty decent to me.

So Compress::Zlib is easy to use and it's a core module. Awesome. 

I think making the deltas may be harder. You can use Git.pm to take advantage
of 'git diff --no-index file1 file2', although git diff returns non zero for a
diff, so Git.pm actually throws an exception which you have to catch and then
you get the diff from there. Not that elegant... plus you'd have to write the
records to temporary files (same with using GNU diff).

I've seen lots of diff modules on CPAN... and it seems that Text::Diff gets
recommended a fair bit (https://metacpan.org/pod/Text::Diff) and shows up in
the O'Reilly book it seems
(http://docstore.mik.ua/orelly/perl4/cook/ch08_23.htm). I also found it was
already installed on my Koha server, although I don't use the Debian packages,
so I can't attest to that. It looks like it's required by Test::Differences and
that lots of modules use that, so that's probably why it's on my system. I've
just tried it out and it's easy to use. Looks like we'd want to use Text::Patch
for applying the diff to rebuild a record... although I haven't tried it.

Using Text::Diff I got a patch that was 378B uncompressed.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-04-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #12 from David Cook  ---
Using whole records, it would be easy to recover an older version on a
timeline. 

Per field changes would be harder... but you could always load the older
version and then do your own diff algorithm for diffing MARC::Record objects...
then choose which differences to apply... but that would be work.

Actually, a person could look at XML::Diff as well... as that could make
computing the difference a lot easier at the field level. 

Personally, I like the idea of just using the whole record. It's less granular
but it would be easier.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-06-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-06-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #13 from Aleisha Amohia  ---
Created attachment 64243
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64243&action=edit
Bug 14367: [FOLLOW-UP] Fixing merge conflicts...

...and other fixes to make patch work.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Hugo Agud  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply
 CC||ha...@orex.es

--- Comment #14 from Hugo Agud  ---
56613 - Bug 14367: Add MARC record history
64243 - Bug 14367: [FOLLOW-UP] Fixing merge conflicts...

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 14367: Add MARC record history
Using index info to reconstruct a base tree...
M   C4/Biblio.pm
M   cataloguing/addbiblio.pl
M   koha-tmpl/intranet-tmpl/prog/css/addbiblio.css
M   koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
M   koha-tmpl/intranet-tmpl/prog/js/cataloging.js
:376: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/js/cataloging.js
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/css/addbiblio.css
CONFLICT (content): Merge conflict in
koha-tmpl/intranet-tmpl/prog/css/addbiblio.css
Auto-merging cataloguing/addbiblio.pl
CONFLICT (content): Merge conflict in cataloguing/addbiblio.pl
Auto-merging C4/Biblio.pm
CONFLICT (content): Merge conflict in C4/Biblio.pm
Failed to merge in the changes.
Patch failed at 0001 Bug 14367: Add MARC record history
The copy of the patch that failed is found in:
   /home/vagrant/kohaclone/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-14367-Add-MARC-record-history-6jWpQA.patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-08-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

M. Tompsett  changed:

   What|Removed |Added

 CC||mtomp...@hotmail.com

--- Comment #15 from M. Tompsett  ---
The patch needs major intervention in reworking with the introduction of
metadata in C4::Biblio.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2015-09-04 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Zeno Tajoli  changed:

   What|Removed |Added

   Patch complexity|--- |Medium patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2015-10-09 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Martin Persson  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff
 CC||xarra...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2015-11-20 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Josef Moravec  changed:

   What|Removed |Added

 CC||josef.mora...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2015-11-22 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #2 from David Cook  ---
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.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2015-11-22 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #3 from David Cook  ---
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.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2015-12-18 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

jdem...@roseville.ca.us  changed:

   What|Removed |Added

 CC||jdem...@roseville.ca.us

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2015-08-18 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #1 from Martin Persson  ---
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.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2015-08-18 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Nick Clemens  changed:

   What|Removed |Added

 CC||n...@quecheelibrary.org

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-04-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Owen Leonard  changed:

   What|Removed |Added

   Assignee|gmcha...@gmail.com  |xarra...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-04-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Owen Leonard  changed:

   What|Removed |Added

 Status|Needs Signoff   |Failed QA

--- Comment #4 from Owen Leonard  ---
Based on comment 2 and comment 3 I think this should be 'Failed QA'

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

  Attachment #41642|0   |1
is obsolete||

--- Comment #5 from Aleisha Amohia  ---
Created attachment 56613
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56613&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.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-11-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Cook  changed:

   What|Removed |Added

 CC||dc...@prosentient.com.au

--- Comment #6 from David Cook  ---
Not sure about the implementation of this idea, but I like the idea of storing
a history for records...

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2019-04-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Liz Rea  changed:

   What|Removed |Added

 CC||wizzy...@gmail.com
 Status|Needs Signoff   |Patch doesn't apply

--- Comment #21 from Liz Rea  ---
So terribly sorry Aleisha, this patch doesn't apply cleanly anymore.

Liz

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2019-04-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

  Attachment #84841|0   |1
is obsolete||

--- Comment #22 from Aleisha Amohia  ---
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.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2019-04-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

  Attachment #84842|0   |1
is obsolete||

--- Comment #23 from Aleisha Amohia  ---
Created attachment 88828
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88828&action=edit
Bug 14367: (follow-up) Fixing merge conflicts...

...and other fixes to make patch work.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2019-04-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

  Attachment #84859|0   |1
is obsolete||

--- Comment #24 from Aleisha Amohia  ---
Created attachment 88829
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88829&action=edit
Bug 14367: (follow-up) Rebasing to make patch work on master

Run through test plan and confirm everything still works as expected.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2019-04-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

--- Comment #25 from Aleisha Amohia  ---
Rebased

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Katrin Fischer  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #35 from Katrin Fischer  ---
Really interesting feature, starting with QA tools:

 FAIL   installer/data/mysql/atomicupdate/add_history.sql
   FAIL   git manipulation
The file has been added and deleted in the same patchset

 FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
   FAIL   filters
missing_filter at line 903 (   
)
missing_filter at line 904 (   
)
missing_filter at line 904 (   
)
missing_filter at line 908 (   
)
missing_filter at line 908 (   
)
missing_filter at line 916 (   
[% hist.data %])
missing_filter a

 FAIL   Koha/MetadataRecord/History.pm
   FAIL   critic
"return" statement with explicit "undef" at line 103, column 9.
See page 199 of PBP.

Can you please fix?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-05-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-05-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #120480|0   |1
is obsolete||

--- Comment #54 from Aleisha Amohia  ---
Created attachment 121025
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121025&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

Signed-off-by: David Nind 

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-05-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Failed QA

--- Comment #55 from David Nind  ---
Thanks Aleisha.

I'm getting an error when clicking save after making a change to a record:

No property history for Koha::Biblio::Metadata at
/usr/share/perl5/Exception/Class/Base.pm line 88

in Exception::Class::Base::throw at
/usr/share/perl5/Exception/Class/Base.pm line 88

   85: 
   86: $proto->rethrow if ref $proto;
   87: 
   88: die $proto->new(@_);
   89: }
   90: 
   91: sub rethrow {

Show function arguments
in Koha::Object::set at /kohadevbox/koha/Koha/Object.pm line 270

  267: my @columns = @{$self->_columns()};
  268: 
  269: foreach my $p ( keys %$properties ) {
  270: unless ( grep { $_ eq $p } @columns ) {
  271: Koha::Exceptions::Object::PropertyNotFound->throw( "No
property $p for " . ref($self) );
  272: }
  273: }

Show function arguments
in Koha::Object::update at /kohadevbox/koha/Koha/Object.pm line 217

  214: sub update {
  215: my ($self, $values) = @_;
  216: Koha::Exceptions::Object::NotInStorage->throw unless
$self->in_storage;
  217: $self->set($values)->store();
  218: }
  219: 
  220: =head3 $object->delete();

Show function arguments



-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-05-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #56 from Aleisha Amohia  ---
(In reply to David Nind from comment #55)
> Thanks Aleisha.
> 
> I'm getting an error when clicking save after making a change to a record:
> 
> No property history for Koha::Biblio::Metadata at
> /usr/share/perl5/Exception/Class/Base.pm line 88
> 
> in Exception::Class::Base::throw at
> /usr/share/perl5/Exception/Class/Base.pm line 88
> 
>85: 
>86: $proto->rethrow if ref $proto;
>87: 
>88: die $proto->new(@_);
>89: }
>90: 
>91: sub rethrow {
> 
> Show function arguments
> in Koha::Object::set at /kohadevbox/koha/Koha/Object.pm line 270
> 
>   267: my @columns = @{$self->_columns()};
>   268: 
>   269: foreach my $p ( keys %$properties ) {
>   270: unless ( grep { $_ eq $p } @columns ) {
>   271: Koha::Exceptions::Object::PropertyNotFound->throw(
> "No property $p for " . ref($self) );
>   272: }
>   273: }
> 
> Show function arguments
> in Koha::Object::update at /kohadevbox/koha/Koha/Object.pm line 217
> 
>   214: sub update {
>   215: my ($self, $values) = @_;
>   216: Koha::Exceptions::Object::NotInStorage->throw unless
> $self->in_storage;
>   217: $self->set($values)->store();
>   218: }
>   219: 
>   220: =head3 $object->delete();
> 
> Show function arguments
> 
> 

Probably just my test plan missing the requirement of updating the schema
files! Can you please test again?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-05-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-05-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #121025|0   |1
is obsolete||

--- Comment #57 from Aleisha Amohia  ---
Created attachment 121076
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121076&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:
* Update the database, update the schema files, restart services
* 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

Signed-off-by: David Nind 

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-05-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #58 from David Nind  ---

> Probably just my test plan missing the requirement of updating the schema
> files! Can you please test again?

I've done again after running dbic, but I still get the same error.

Even if I don't change anything and just click save.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-05-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #59 from Aleisha Amohia  ---
That's weird I am totally not getting that error. What steps are you taking to
reproduce?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-05-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #60 from David Nind  ---
Hi Aleisha.

I'm using koha-testing-docker:

* apply patch
* databaseupdate
* dbic
* flush_memcached
* restart_all
* edit a record (tried a few different records)
* save (without making any changes)

David

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-06-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Katrin Fischer  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=28500

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-06-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Donna  changed:

   What|Removed |Added

 CC||bwsdo...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-06-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #61 from Donna  ---
*** Bug 28500 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-06-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Hakam Almotlak  changed:

   What|Removed |Added

 CC||hakam.almot...@inlibro.com

--- Comment #62 from Hakam Almotlak  ---
patch does not apply
Applying: Bug 14367: Add MARC record history
Using index info to reconstruct a base tree...
M   C4/Biblio.pm
Falling back to patching base and 3-way merge...
Auto-merging C4/Biblio.pm
CONFLICT (content): Merge conflict in C4/Biblio.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 14367: Add MARC record history
hint: Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-14367-Add-MARC-record-history-1fUpWI.patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-07-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Eric Bégin  changed:

   What|Removed |Added

 CC|hakam.almot...@inlibro.com  |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-02-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-02-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #110489|0   |1
is obsolete||
 Attachment #110490|0   |1
is obsolete||
 Attachment #110491|0   |1
is obsolete||

--- Comment #50 from Aleisha Amohia  ---
Created attachment 116621
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116621&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

Signed-off-by: David Nind 

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-02-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Phil Ringnalda  changed:

   What|Removed |Added

 CC||p...@chetcolibrary.org

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-03-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Séverine Queune  changed:

   What|Removed |Added

 CC||severine.que...@bulac.fr

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-04-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Séverine Queune  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply

--- Comment #51 from Séverine Queune  ---
Sorry Aleisha, i'd be happy to test if you can rebase !

CONFLICT (content): Merge conflict in cataloguing/addbiblio.pl
Auto-merging C4/Biblio.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 14367: Add MARC record history

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-05-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-05-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #116621|0   |1
is obsolete||

--- Comment #52 from Aleisha Amohia  ---
Created attachment 120480
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120480&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

Signed-off-by: David Nind 

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply

--- Comment #53 from David Nind  ---
I was too slow in retesting! The patch no longer applies 8-(..

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #102175|0   |1
is obsolete||

--- Comment #38 from Aleisha Amohia  ---
Created attachment 110140
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110140&action=edit
Bug 14367: (follow-up) Rebasing to make patch work on master

Run through test plan and confirm everything still works as expected.

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #102174|0   |1
is obsolete||

--- Comment #37 from Aleisha Amohia  ---
Created attachment 110139
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110139&action=edit
Bug 14367: (follow-up) Fixing merge conflicts...

...and other fixes to make patch work.

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #102173|0   |1
is obsolete||

--- Comment #36 from Aleisha Amohia  ---
Created attachment 110138
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110138&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

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Attachment #110139|0   |1
is obsolete||

--- Comment #40 from David Nind  ---
Created attachment 110226
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110226&action=edit
Bug 14367: (follow-up) Fixing merge conflicts...

...and other fixes to make patch work.

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Attachment #110140|0   |1
is obsolete||

--- Comment #41 from David Nind  ---
Created attachment 110227
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110227&action=edit
Bug 14367: (follow-up) Rebasing to make patch work on master

Run through test plan and confirm everything still works as expected.

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Attachment #110138|0   |1
is obsolete||

--- Comment #39 from David Nind  ---
Created attachment 110225
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110225&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

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Katrin Fischer  changed:

   What|Removed |Added

 Status|Signed Off  |Patch doesn't apply

--- Comment #42 from Katrin Fischer  ---
Tiny conflict, can you please rebase?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #110225|0   |1
is obsolete||

--- Comment #43 from Aleisha Amohia  ---
Created attachment 110442
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110442&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

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #110226|0   |1
is obsolete||

--- Comment #44 from Aleisha Amohia  ---
Created attachment 110443
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110443&action=edit
Bug 14367: (follow-up) Fixing merge conflicts...

...and other fixes to make patch work.

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #110227|0   |1
is obsolete||

--- Comment #45 from Aleisha Amohia  ---
Created attachment 110444
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110444&action=edit
Bug 14367: (follow-up) Rebasing to make patch work on master

Run through test plan and confirm everything still works as expected.

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Attachment #110442|0   |1
is obsolete||

--- Comment #46 from David Nind  ---
Created attachment 110489
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110489&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

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Attachment #110444|0   |1
is obsolete||

--- Comment #48 from David Nind  ---
Created attachment 110491
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110491&action=edit
Bug 14367: (follow-up) Rebasing to make patch work on master

Run through test plan and confirm everything still works as expected.

Signed-off-by: David Nind 

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-09-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Attachment #110443|0   |1
is obsolete||

--- Comment #47 from David Nind  ---
Created attachment 110490
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110490&action=edit
Bug 14367: (follow-up) Fixing merge conflicts...

...and other fixes to make patch work.

Signed-off-by: David Nind 

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-10-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Katrin Fischer  changed:

   What|Removed |Added

 Status|Signed Off  |Patch doesn't apply

--- Comment #49 from Katrin Fischer  ---
The patch no longer applies, can you please rebase?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 14367: Add MARC record history
Using index info to reconstruct a base tree...
M   C4/Biblio.pm
M   koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
Auto-merging C4/Biblio.pm
CONFLICT (content): Merge conflict in C4/Biblio.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 14367: Add MARC record history
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-14367-Add-MARC-record-history-X_q2HV.patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-02-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply
 CC||da...@davidnind.com

--- Comment #26 from David Nind  ---
Patches no longer apply.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-03-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

  Attachment #88827|0   |1
is obsolete||

--- Comment #27 from Aleisha Amohia  ---
Created attachment 102065
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102065&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.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-03-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

  Attachment #88828|0   |1
is obsolete||

--- Comment #28 from Aleisha Amohia  ---
Created attachment 102066
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102066&action=edit
Bug 14367: (follow-up) Fixing merge conflicts...

...and other fixes to make patch work.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-03-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-03-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

  Attachment #88829|0   |1
is obsolete||

--- Comment #29 from Aleisha Amohia  ---
Created attachment 102067
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102067&action=edit
Bug 14367: (follow-up) Rebasing to make patch work on master

Run through test plan and confirm everything still works as expected.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-03-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #30 from David Nind  ---
Hi Aleisha.

Everything works as expected for me.

Things I noted:

1. The first change doesn't record what was originally there. For example, if
the Title (245 tag a) was 'Abc' and I change it to 'XYZ' then the history
table/log shows as 'XYZ', rather than 'Abc'. Later changes are as expected in
the history, and can be restored.

2. The history recorded seems to be at the field level rather than the subfield
level. For example, if 245 has subfield a and c and I change a, c also shows
the change history. 

Happy to sign off if that is what is expected for the first iteration.

David

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-03-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #31 from Aleisha Amohia  ---
I think what we have is good for a first iteration. I'm happy to work on the
extra stuff once this is through as it is working.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Attachment #102065|0   |1
is obsolete||

--- Comment #32 from David Nind  ---
Created attachment 102173
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102173&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

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Attachment #102066|0   |1
is obsolete||

--- Comment #33 from David Nind  ---
Created attachment 102174
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102174&action=edit
Bug 14367: (follow-up) Fixing merge conflicts...

...and other fixes to make patch work.

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2020-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Attachment #102067|0   |1
is obsolete||

--- Comment #34 from David Nind  ---
Created attachment 102175
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102175&action=edit
Bug 14367: (follow-up) Rebasing to make patch work on master

Run through test plan and confirm everything still works as expected.

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #121076|0   |1
is obsolete||

--- Comment #63 from Aleisha Amohia  ---
Created attachment 126413
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126413&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:
* Update the database, update the schema files, restart services
* 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

Signed-off-by: David Nind 

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

--- Comment #64 from Aleisha Amohia  ---
Created attachment 126414
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126414&action=edit
Bug 14367: Updated schema files

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-12-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Frank Hansen  changed:

   What|Removed |Added

 CC||frank.han...@ub.lu.se

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2021-12-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Frank Hansen  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply

--- Comment #65 from Frank Hansen  ---
Applying: Bug 14367: Add MARC record history
Using index info to reconstruct a base tree...
M   C4/Biblio.pm
M   cataloguing/addbiblio.pl
M   koha-tmpl/intranet-tmpl/prog/css/addbiblio.css
M   koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
M   koha-tmpl/intranet-tmpl/prog/js/cataloging.js
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/js/cataloging.js
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/css/addbiblio.css
Auto-merging cataloguing/addbiblio.pl
CONFLICT (content): Merge conflict in cataloguing/addbiblio.pl
Auto-merging C4/Biblio.pm
CONFLICT (content): Merge conflict in C4/Biblio.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 14367: Add MARC record history

Patch doesn't apply.
Rebase please.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2023-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Phil Ringnalda  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2023-01-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2023-01-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #131214|0   |1
is obsolete||

--- Comment #69 from Aleisha Amohia  ---
Created attachment 145655
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145655&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:
* Update the database, update the schema files, restart services
* 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

Signed-off-by: David Nind 

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2023-01-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #131215|0   |1
is obsolete||

--- Comment #70 from Aleisha Amohia  ---
Created attachment 145656
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145656&action=edit
Bug 14367: Updated schema files

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2023-01-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Failed QA

--- Comment #71 from David Nind  ---
Notes from testing (using koha-testing-docker):

1. The tests fail:

prove -vvv t/db_dependent/BiblioHistory.t
t/db_dependent/BiblioHistory.t .. 
1..6
ok 1 - use C4::Biblio;
Error: value hash contains unrecognized columns: branchcode at
/kohadevbox/koha/t/lib/TestBuilder.pm line 286.
# Looks like your test exited with 11 just after 1.
Dubious, test returned 11 (wstat 2816, 0xb00)
Failed 5/6 subtests 

Test Summary Report
---
t/db_dependent/BiblioHistory.t (Wstat: 2816 Tests: 1 Failed: 0)
  Non-zero exit status: 11
  Parse errors: Bad plan.  You planned 6 tests but ran 1.
Files=1, Tests=1,  2 wallclock secs ( 0.02 usr  0.00 sys +  1.11 cusr  0.23
csys =  1.36 CPU)
Result: FAIL

2. After applying the patch, I ran updatedatabase, flush_memcached and
restart_all. I didn't run dbic as the updated schema files patch takes care of
things (if I do run dbic I get an error when saving the record).

3. It is a while ago since I last tested. But I think when I made a change (for
example, to a title), only the title had the history button. Now, every
existing entry has one (excluding 000, 001, 005, 008). But I could be
misremembering!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2023-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2023-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #145655|0   |1
is obsolete||

--- Comment #72 from Aleisha Amohia  ---
Created attachment 146997
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146997&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:
* Update the database, update the schema files, restart services
* 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

Signed-off-by: David Nind 

Signed-off-by: David Nind 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2023-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #145656|0   |1
is obsolete||

--- Comment #73 from Aleisha Amohia  ---
Created attachment 146998
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146998&action=edit
Bug 14367: Updated schema files

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2023-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14367

Andreas Roussos  changed:

   What|Removed |Added

 CC||a.rous...@dataly.gr

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


  1   2   >