This bug adds support for additional fields in the ERM module's
packages, similar to how Bug 35287 added support for additional fields
in the ERM module's licences, and Bug 37576 added support for additional
fields in the ERM module's agreements.
To test (k.t.d):
a) APPLY PATCH
b) Run cypress --spec t/cypress/integration/AdditionalFields_spec.ts
1) Note how the tests pass
c) Add new additional fields for 'erm_packages'
1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_packages
2) Create field one called 'text non-repeatable'
3) Create field two called 'text repeatable', check 'repeatable'
4) Create field three called 'av non-repeatable', pick LANG authorised
value
5) Create field four called 'av repeatable', pick LOC authorised value,
check repeatable
d) Create new local package
1) Go to /cgi-bin/koha/erm/eholdings/local/packages/add, notice the new
additional fields section
2) Complete all mandatory fields for a new package
3) Experiment with the four different additional field types – it
may be useful to watch the Cypress-generated test video for
guidance
4) Select some AV options from the AV fields, deselect them, notice
the repeatable one allows for multiple selection, the non-repeatable
one does not
e) Save the package, then view it
1) To view the package, click its name in the table list on
/cgi-bin/koha/erm/eholdings/local/packages
2) notice the additional fields on display
3) also notice that the authorised values are in their human-readable
form, and not their coded form
f) Edit the package, then view it again
1) Go to /cgi-bin/koha/erm/eholdings/local/packages/edit/1
2) Play around again with the fields. Save.
3) Repeat step e, have the edits shown up?
g) Test searchability
1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_packages
2) Edit one of the fields and make sure searchable is checked (ensure
you choose a field that has some data in it)
3) Go to /cgi-bin/koha/erm/eholdings/local/packages
4) Notice that the searchable field(s) are now columns in the table
5) Notice that searchable AV fields contain a drop-down
6) Notice that searchable text fields have an input field
7) Perform a search on the additional field
8) Notice that the searching is working as expected
h) SIGN OFF
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>