Bug 11936: Consistent log message for item insert
authorMagnus Enger <magnus@libriotech.no>
Thu, 22 Feb 2018 09:37:08 +0000 (10:37 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 23 Apr 2018 22:24:07 +0000 (22:24 +0000)
commitaa7954907b94487f17d13573c19d9fbd7c6677b2
tree920360991b6f3ad309ba79f6b1ac18e798c8f92e
parent8450d2020bdfd524ebd20f0de8d278497fce0759
Bug 11936: Consistent log message for item insert

If you use bulkmarcimport.pl to import records with items it looks
like the successfull insert of the record is reported multiple time,
but the second and subsequent "ok" is really related to importing
the item(s).

This patch changes the log message on successfully inserting an item
to match the log message given when inserting an item fails.

To test, the easy way:
- Look at lines 530 and 536 of bulkmarcimport.pl, and note that the
  "op" in those two lines are different
- Apply the patch
- Look at lines 530 and 536 again, and note that the "op" is now
  identical, and that this makes sense, since they are both related
  to the same operation, specifically inserting an item

To test, the hard way
- Have some records with items
- Import the records with bulkmarcimport.pl, and make sure to specify
  the -l option, to create a log of the actions taken
- Look at the log and verify it looks something like this:
  id;operation;status
  1;insert;ok
  1;insert;ok
  2;insert;ok
  2;insert;ok
- Apply this patch and import some more records with items. The log
  should now be similar to this:
  id;operation;status
  1;insert;ok
  1;insertitem;ok
  2;insert;ok
  2;insertitem;ok

Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
misc/migration_tools/bulkmarcimport.pl