Bug 32030: Create eHolding titles from a list
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 2 Aug 2022 09:35:51 +0000 (11:35 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 8 Nov 2022 12:44:20 +0000 (09:44 -0300)
commit94c67c439eb89b519a56198df122ee1f6b5ac93d
tree9d1a822cb2ea3610d7273ae764e9d27b3a2459b2
parentca05262604c4a648605c9f47a4d144226f0d6a49
Bug 32030: Create eHolding titles from a list

Add the ability to create new titles and attach them to a package.
The MARC to KBART2 mapping is the following (based on
https://github.com/adambuttrick/marc_to_kbart/blob/master/convert.py):

publication_title = biblio.title
print_identifier  = 020$a||020$z||022$a||022$y
online_identifier = 020$a||020$z||022$a||022$y
date_first_issue_online = 866$a (before '-')
date_last_issue_online  = 866$a (after '-')
num_first_vol_online    = 863$a (before '-')
num_last_vol_online     = 863$a (after '-')
num_first_issue_online  = ?
num_last_issue_online   = ?
title_url = 856$u
first_author = biblio.first_author
embargo_info = ?
coverage_depth = title_url ? 'fulltext' : 'print'
notes = $852$z
publisher_name = 260$b
publication_type = ?
date_monograph_published_print = ?
date_monograph_published_online = ?
monograph_volume = ?
monograph_edition = ?
first_editor = ?
parent_publication_title_id = ?
preceeding_publication_title_id = ?
access_type = ?

Note that title is not created (and so the resource) if a title from
this package already has a link to this bibliographic record.
Is that correct, or should we create another resource?

Should the import screen also have "start date" and "end date" to set for the
resource?

QA note: Ideally we would like to fetch the list from the REST API but the routes
are not there yet.

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
13 files changed:
Koha/BackgroundJob.pm
Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm [new file with mode: 0644]
Koha/REST/V1/ERM/EHoldings/Titles.pm
Koha/REST/V1/ERM/EHoldings/Titles/Local.pm
api/v1/swagger/paths/erm_eholdings_titles.yaml
api/v1/swagger/swagger.yaml
koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/create_eholdings_from_biblios.inc [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt
koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesFormImport.vue [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesToolbar.vue
koha-tmpl/intranet-tmpl/prog/js/vue/fetch.js
koha-tmpl/intranet-tmpl/prog/js/vue/routes.js