[Koha-bugs] [Bug 33036] REST API: Merge biblio records
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Oct 19 23:13:57 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036
Zeno Tajoli <ztajoli at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Failed QA |Needs Signoff
--- Comment #20 from Zeno Tajoli <ztajoli at gmail.com> ---
This is a rewrite of the feature with the use of a module, tests, and perltidy.
Now merge.pl and the REST API controller use Koha::Biblio::merge_with.
Test plan:
1) you need an API user with the permissions "editcatalogue"
2) two records: one to be merged into (with biblio_id, eg 262) and another
one from
which to merge (with biblio_id_to_merge, eg 9) which will be deleted!
both records may/should have items, subscription, subscriptionhistory,
serial, suggestions
orders and holds
3) check both records via the web
4) Apply patch
5) execute API calls eg like
PUT /biblios/{biblio_id}/merge/{biblio_id_to_merge}
eg:
curl -s -u koha:koha -X POST
"http://127.0.0.1:8081/api/v1/biblios/262/merge/9"
6) the record with the id <biblio_id_to_merge> is deleted now, the record
with <biblio_id>
has all items, etc attached, return code is 200, with the message
{"message":"Successfuly merged 9 into 262"}
7) optionally a full MARCXML record may be sent as body of the API call
curl -s -u koha:koha -X POST
"http://127.0.0.1:8081/api/v1/biblios/262/merge/2" -d @marcfile.xml
8) now also the content of the record with <biblio_id> is replaced with the
content of the MARCXML file
9) Go into intramet and do a search. Select two or (better) more record.
10) Merge them; merge must be a success.
11) Test with prove -v t/db_dependent/Koha/Biblio.t
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list