Koha/Koha
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
..
Account Bug 29139: Add exceptions to relation accessors 2021-10-01 16:28:55 +02:00
Acquisition Bug 28640: Expose EDI Status on basket details page 2021-07-26 12:46:32 +02:00
App Bug 20582: Reset CGI::PARAM_UTF8 to 1 before each CGI request 2020-10-06 14:34:17 +02:00
ArticleRequest Bug 27944: (follow-up) Move statuses to constants 2021-10-05 10:58:14 +02:00
Authority Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
BackgroundJob Bug 23678: Include file for batch_hold_cancel 2021-10-01 16:09:20 +02:00
Biblio Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
BiblioUtils Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Cache Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Cash Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Charges Bug 22435: (follow-up) Update POS for reduced offset types 2021-08-04 14:06:43 +02:00
Checkouts Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Club Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Config Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Course Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Edifact Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Exceptions Bug 27947: (QA follow-up) Refactor routes 2021-10-06 10:09:25 +02:00
Exporter Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ExternalContent Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Filter/MARC Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Illrequest Bug 22614: Migrate original request 2021-09-21 20:22:57 +02:00
Indexer
Item Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Library Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
List Bug 17600: (follow-up) Fix other occurrences in svc 2021-07-26 16:56:49 +02:00
MetadataRecord Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Middleware
Misc
Notice Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Number Bug 26239: Do not format large negative numbers 2020-08-19 08:22:02 +02:00
OAI/Server Bug 26195: Add a way to specify authorised values should be expanded [OAI] 2021-08-31 10:27:52 +02:00
Object Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Objects Bug 23271: Prevent crash if called without parameters 2021-04-21 15:25:07 +02:00
Old Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Patron Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Patrons Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
pdfformat Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Plugins Bug 29121: Catch errors in ->install and ->upgrade calls on plugins 2021-10-01 16:28:55 +02:00
RecordProcessor
REST Bug 27947: (QA follow-up) Make parameters a hashref 2021-10-06 10:09:54 +02:00
Schema Bug 27947: DBIC schema changes 2021-10-06 10:09:25 +02:00
SearchEngine Bug 28826: Add FacetOrder system preference 2021-09-29 11:34:21 +02:00
Serial Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Sitemapper Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SMS Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SMTP Bug 26595: Remove password from the smtp_server API object 2020-10-14 15:53:38 +02:00
Subscription Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SuggestionEngine Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Tags Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Template/Plugin Bug 27944: Add "requested" stage in article request process 2021-10-05 10:58:14 +02:00
Util Bug 27461: Move hardcoded value to module 2021-09-28 15:12:45 +02:00
XSLT Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Z3950Responder Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Account.pm Bug 29139: Only pass the offsets for lines the credit was applied to 2021-10-01 16:28:55 +02:00
ActionLog.pm
ActionLogs.pm
AdditionalContent.pm Bug 24387: Rename "News" with "Additional contents" 2021-08-16 11:55:55 +02:00
AdditionalContents.pm Bug 24387: Fix Letters/TemplateToolkit.t 2021-08-16 15:18:10 +02:00
AdditionalField.pm
AdditionalFields.pm
AdditionalFieldValue.pm
AdditionalFieldValues.pm
AdvancedEditorMacro.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AdvancedEditorMacros.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ApiKey.pm Bug 28772: Make validate_secret return 1|0 2021-09-30 09:48:41 +02:00
ApiKeys.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ArticleRequest.pm Bug 27947: (QA follow-up) Make parameters a hashref 2021-10-06 10:09:54 +02:00
ArticleRequests.pm Bug 27944: Add "requested" stage in article request process 2021-10-05 10:58:14 +02:00
AudioAlert.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AudioAlerts.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AuthorisedValue.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AuthorisedValueCategories.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AuthorisedValueCategory.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AuthorisedValues.pm Bug 28554: In Koha::AuthorisedValues sort by description 2021-08-30 17:02:07 +02:00
Authorities.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Authority.pm
AuthUtils.pm Bug 28772: Add a warning about hash_password usage in updatedatabase.pl 2021-09-30 09:19:05 +02:00
BackgroundJob.pm Bug 23678: Allow cancel holds in bulk 2021-10-01 16:02:58 +02:00
BackgroundJobs.pm Bug 22417: Add missing POD and html filters 2020-10-05 15:23:08 +02:00
Biblio.pm Bug 27526: Adjust code to use Koha::Items 2021-10-06 11:44:22 +02:00
BiblioFramework.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
BiblioFrameworks.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Biblioitem.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Biblioitems.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Biblios.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
BiblioUtils.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Cache.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Caches.pm
Calendar.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Checkout.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Checkouts.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CirculationRule.pm
CirculationRules.pm Bug 27945: Terminology: max daily => open requests limit 2021-10-06 10:08:17 +02:00
Cities.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
City.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSortRule.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSortRules.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSource.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSources.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSplitRule.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSplitRules.pm
Club.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Clubs.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Config.pm Bug 28306: Allow to query database with minimal memory footprint 2021-08-31 10:27:52 +02:00
Course.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Courses.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CoverImage.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CoverImages.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CsvProfile.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CsvProfiles.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Database.pm Bug 28306: Fix POD 2021-08-31 10:27:52 +02:00
DateUtils.pm
Desk.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Desks.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
EDI.pm Bug 28960: Explicitly call get_column 2021-09-20 12:06:53 +02:00
Edifact.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Email.pm Bug 28803: (follow-up) Error details improvement 2021-09-28 10:22:36 +02:00
Exceptions.pm Bug 26518: Raise exception if the insert failed 2020-11-25 15:18:17 +01:00
ExternalContent.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
FrameworkPlugin.pm
Hold.pm Bug 17600: Remove wrong C4::Context imports 2021-09-20 14:44:27 +02:00
Holds.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
I18N.pm Bug 17600: (follow-up) Fix wrong import in Koha::I18N - LC_MESSAGES 2021-07-27 14:49:22 +02:00
Illcomment.pm
Illcomments.pm
Illrequest.pm Bug 28340: Alphabetise metadata for notices 2021-09-21 20:22:57 +02:00
Illrequestattribute.pm
Illrequestattributes.pm
Illrequests.pm
ImportBatch.pm Bug 23019: Add profiles to stage-import-batch and magnage-import-batch pages 2020-11-11 15:55:49 +01:00
ImportBatches.pm Bug 23019: Add profiles to stage-import-batch and magnage-import-batch pages 2020-11-11 15:55:49 +01:00
ImportBatchProfile.pm Bug 23019: (follow-up) Fix other things 2020-11-11 15:55:49 +01:00
ImportBatchProfiles.pm Bug 23019: (follow-up) Fix other things 2020-11-11 15:55:49 +01:00
Item.pm Bug 27526: Adjust code to use Koha::Items 2021-10-06 11:44:22 +02:00
Items.pm Bug 22690: (QA follow-up) Fix indexing for Items sets 2021-08-27 11:02:41 +02:00
ItemType.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ItemTypes.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
KeyboardShortcut.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
KeyboardShortcuts.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Libraries.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Library.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Linktracker.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Localization.pm
Localizations.pm
Logger.pm Bug 25464: Add ability to specify client IP and SIP account used in SIP2 logging 2021-07-26 12:46:32 +02:00
Manual.pm Bug 24387: Rename "News" with "Additional contents" 2021-08-16 11:55:55 +02:00
MarcSubfieldStructure.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
MarcSubfieldStructures.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
MessageAttribute.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
MessageAttributes.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
MetadataIterator.pm
MetadataRecord.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
MetaSearcher.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
MoreUtils.pm
OAuth.pm Bug 28772: Make secret validation use the new method 2021-09-30 09:19:05 +02:00
OAuthAccessToken.pm
OAuthAccessTokens.pm
Object.pm Bug 28744: Better handling of undefined to_api_mapping 2021-08-30 17:02:07 +02:00
Objects.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Patron.pm Bug 27945: Terminology: max daily => open requests limit 2021-10-06 10:08:17 +02:00
Patrons.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Plugins.pm Bug 29121: Catch errors in ->install and ->upgrade calls on plugins 2021-10-01 16:28:55 +02:00
ProblemReport.pm
ProblemReports.pm
PseudonymizedTransaction.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
PseudonymizedTransactions.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Quote.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Quotes.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Rating.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Ratings.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
RDF.pm
RecordProcessor.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Report.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Reports.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Review.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Reviews.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Schema.pm
Script.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SearchEngine.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SearchField.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SearchFields.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SearchMarcMap.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SearchMarcMaps.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Serial.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Serials.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SharedContent.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SimpleMARC.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Sitemapper.pm
Statistic.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Statistics.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
StockRotationItem.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
StockRotationItems.pm
StockRotationRota.pm
StockRotationRotas.pm
StockRotationStage.pm
StockRotationStages.pm
Subscription.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Subscriptions.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Suggestion.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SuggestionEngine.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Suggestions.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Tag.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Tags.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Token.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
TrackedLink.pm Bug 22690: (QA follow-up) Add TrackedLink classes and use them 2021-08-27 11:02:41 +02:00
TrackedLinks.pm Bug 22690: (QA follow-up) Add TrackedLink classes and use them 2021-08-27 11:02:41 +02:00
UploadedFile.pm Bug 28123: Quote filename value in Content-Disposition header 2021-04-16 12:28:18 +02:00
UploadedFiles.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Uploader.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Virtualshelf.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Virtualshelfcontent.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Virtualshelfcontents.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Virtualshelfshare.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Virtualshelfshares.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Virtualshelves.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Z3950Responder.pm Bug 25292: Flushing L1 on every Z3950 server search 2021-01-11 10:27:37 +01:00
Z3950Server.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Z3950Servers.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00