Bug 8976: Add the ability to sort subfields for the MARC frameworks
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 1 Dec 2020 17:08:20 +0000 (18:08 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 1 Mar 2021 14:14:22 +0000 (15:14 +0100)
commitb387502eaf23235cc5faa75c5bf1463529b20b1c
tree50a5d5848626bb41bc221b5a0ce9ed2b54b223e3
parent742483e7e3d99a7cc9c66608bc0c2adce9a3e1cf
Bug 8976: Add the ability to sort subfields for the MARC frameworks

This new enhancement adds the ability to change the default order the subfields.

Both bibliographic and authority MARC subfield structure are taken into
account. And so the item edition as well (in the different screens when
item can be added/edited).

This will answer the following needs that have been listed in the
comments of the bug report:
- $i in 7xx fields should be the first subfield in the sequence
- 300 fields are sorted number first when cataloguers enter the letter fields first
- 100 field, it's commonly $a, $q, $d.

Test plan:
1. Edit a MARC frameworks, field 300
2. Resort the subfield (drag and drop the tab of the subfield) as you
like
3. Save
=> Notice that the list of fields are displayed following the order you
chose
4. Edit it again
=> The order is correctly kept!
5. Create a new bibliographic record
6. Notice that the subfields are order in the same sequence
7. Fill different subfields, not all
8. Save, edit again
9. Note that the subfields that have been filled are listed first, then
the empty ones. But the sequence defined at the framework level is kept.
10. Do the same for an authority framework and create/edit an authority
record
11. Modify item (952) subfields order
12. Create an item and confirm that the order is correct
13. Modify the ACQ framework, 952, modify the order of the subfield
14. Create a new order and confirm that the item form has the subfield
ordered following the sequence defined at the framework level

QA: Note that this patch is about bibliographic records only, next
patches deal with authotiries and items.

Sponsored-by: Orex Digital
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Biblio.pm
admin/marc_subfields_structure.pl
cataloguing/addbiblio.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt
koha-tmpl/intranet-tmpl/prog/js/marc_subfields_structure.js