Koha/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing
Jonathan Druart 7a8357f709 Bug 27526: Adjust code to use Koha::Items
Not that we removed all the transformations of the item and are using
Koha::Item from DB to TT (and the other way around), some code needs
adjustments.

- Retrieve host items can be simplified (see Koha::Biblio->host_items)
- Some TT variables have been renamed for better understanding
- Koha::Item->columns_to_str return a hashref with the representation
string of the columns. A date will return the value how it must be
displayed, using output_pref. A subfield linked with a AV will be
replaced with the AV's description.
- LastCreatedItem cookie serializes and stores Koha::Item->unblessed,
no longer the MARC::Record

Change in behaviour: If a subfield is linked with a AV cat and the value
is not a valid AV, before this patch the column was displayed with an
empty value. Now the column is hidden, it's considered empty.
In the sample data it happens with itemlost (0) and withdrawn (0).

Test plan:
1. Test the Prefill
 a. Turn PrefillItem on
 b. Fill in SubfieldsToUseWhenPrefill with some subfield codes
 c. Catalogue an item, save
 => The values from subfields listed in SubfieldsToUseWhenPrefill must be
 kept
2. more subfields
 a. Add subfields that are not linked with a koha field (k is available)
 b. Create an item and fill in all the values
 c. Confirm that non linked subfields are stored and displayed correctly
 d. Try with a "more subfield" that is linked with an authorised value
 category
3. Test barcode values
4. Test the different "Add" buttons at the bottom of the form

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-06 11:44:22 +02:00
..
value_builder Bug 28438: Capitalization: Various corrections 2021-09-28 15:12:45 +02:00
addbiblio.tt Bug 29137: Add new syspref to disable AV creation within the cataloguing module 2021-10-01 16:09:55 +02:00
addbooks.tt Bug 28543: Clicking on 'New record' will use default framework 2021-07-26 12:46:32 +02:00
additem.tt Bug 27526: Adjust code to use Koha::Items 2021-10-06 11:44:22 +02:00
editor.tt Bug 26703: cataloguing folder 2021-04-21 11:16:33 +02:00
linkitem.tt Bug 26703: cataloguing folder 2021-04-21 11:16:33 +02:00
merge.tt Bug 26703: cataloguing folder 2021-04-21 11:16:33 +02:00
moveitem.tt Bug 26703: cataloguing folder 2021-04-21 11:16:33 +02:00
z3950_auth_search.tt Bug 28438: Capitalization: Various corrections 2021-09-28 15:12:45 +02:00
z3950_search.tt Bug 28773: (QA follow-up) Additional changes 2021-08-04 14:06:43 +02:00