Bug 27461: Right pad with default elements for too short 008s
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 19 Aug 2021 13:43:48 +0000 (13:43 +0000)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 8 Oct 2021 11:58:08 +0000 (07:58 -0400)
commit1803e69b2f59b29fc1ea153054944cfecbcec909
tree9f83ac6532fb48ce5b2d2bca79601ba0560201b3
parent218c44c395e05ce3815c6eef0fb0ae34c6f729f8
Bug 27461: Right pad with default elements for too short 008s

Note that we treat the elements 18-34 as one block of elements,
since its subdivision may vary.
E.g. if you pass 24 characters to the form, it will use the first
18 chars (until the last complete element) and pad with default
elements from position 18-39.

Test plan:
[1] Go to addbiblio. Make sure that 008 is connected to the plugin.
[2] Backspace field 008 a bit, click on the plugin button.
[3] Verify that the last elements come from the default.
[4] Repeat for a few different lengths.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
cataloguing/value_builder/marc21_field_008.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt