[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-05-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Lucas Gass  changed:

   What|Removed |Added

 CC||lu...@bywatersolutions.com
 Status|Pushed to stable|Needs documenting

--- Comment #53 from Lucas Gass  ---
Enhancement will not be included in 23.05.x

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-04-16 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Blocks||36613


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36613
[Bug 36613] Wrong return statuses on merge biblio feature
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-04-10 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Blocks||36565


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36565
[Bug 36565] Fix API docs inconsistencies
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-03-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Fridolin Somers  changed:

   What|Removed |Added

 Status|Pushed to master|Pushed to stable
 Version(s)|24.05.00|24.05.00,23.11.04
released in||
 CC||fridolin.som...@biblibre.co
   ||m

--- Comment #52 from Fridolin Somers  ---
Test suite is happy, I backport

Pushed to 23.11.x for 23.11.04

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-03-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Zeno Tajoli  changed:

   What|Removed |Added

  Text to go in the||A new endpoint of REST API
  release notes||/biblios, to merge two
   ||bibliographic records. You
   ||need to pass parameters
   ||with a json file.
   ||Complete
   ||endpoint:
   ||/api/v1/biblios/<
   ||biblo_id>/merge
   ||Parametes
   ||of json file:
   ||-
   ||biblio_id_to_merge
   ||(mandatory)
   ||- rules
   ||(optional)
   ||-
   ||framework_to_use (optional)
   ||- datarecord (optional)
   ||More info in the
   ||Swagger/OpenAPI
   ||Specification of the API

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-03-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Zeno Tajoli  changed:

   What|Removed |Added

  Documentation|A new endpoint  |
 submission||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-03-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Zeno Tajoli  changed:

   What|Removed |Added

  Documentation||A new endpoint
 submission||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-03-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Martin Renvoize  changed:

   What|Removed |Added

 Blocks||29392


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29392
[Bug 29392] Add plugin hooks before merging biblios or authorities
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-03-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Martin Renvoize  changed:

   What|Removed |Added

 CC||martin.renvoize@ptfs-europe
   ||.com
 QA Contact||jonathan.dru...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-03-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #51 from Katrin Fischer  ---
Pushed for 24.05!

Well done everyone, thank you!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-03-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Katrin Fischer  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to master
 Version(s)||24.05.00
released in||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-03-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #50 from Katrin Fischer  ---
Fixed some small conflicts in Biblio.t caused by the adding of other unit tests
meanwhile. 
Easy to verify for unit tests that you got things right at least :)

I notice this adds a lot of dependencies on C4 modules to Koha/Biblio.pm. I
wonder if not some of those could have been replaced easily, like
"CountSubscriptionFromBiblioNumber". 

Maybe something for later follow-ups?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-01-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #49 from Jonathan Druart  ---
Created attachment 160472
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160472=edit
Bug 33036: Improve REST API controller

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-01-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #48 from Jonathan Druart  ---
Created attachment 160471
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160471=edit
Bug 33036: Use Koha::Objects

Better to use Koha::Objects everywhere and have the same pattern for the
different related objects.

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-01-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #47 from Jonathan Druart  ---
Created attachment 160470
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160470=edit
Bug 33036: Add more tests

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-01-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #46 from Jonathan Druart  ---
Created attachment 160469
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160469=edit
Bug 33036: Improve merge_with tests

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-01-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #159191|0   |1
is obsolete||
 Attachment #159826|0   |1
is obsolete||
 Attachment #159827|0   |1
is obsolete||
 Attachment #159828|0   |1
is obsolete||
 Attachment #159829|0   |1
is obsolete||
 Attachment #160302|0   |1
is obsolete||

--- Comment #45 from Jonathan Druart  ---
Created attachment 160468
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160468=edit
Bug 33036: REST API: Merge biblio records implements merging of records

+ attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

This is a slightly improved version of Zenos patch: I (domm) have converted the
code in Koha::Biblio to a more DBICy style and packed it into a transaction (as
requested in Comment 23)

Even the QA script is happy now!

To test:
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) Write a JSON file with inside the field 'biblio_id_to_merge' and the
biblionumber from wihich to merge.
   As example:
   {
 "biblio_id_to_merge" : 9
   }
 6) Execute an API call with correct headers and location. For example:
curl -s -u koha:koha --header "Content-Type: application/json" --header
"Accept: application/marc-in-json"
  --request POST
"http://127.0.0.1:8080/api/v1/biblios/262/merge; -d @file.json
You must to setup the headers and to use a json file with parameters
 7) The record with the id 9 is deleted now, the record with 262 has all
items, etc attached,
the return is: return code 200 and the changed record 262 in
marc-in-json format
 8) It is possible to override biblio data with an external bib record. You
need to put external bib record
into the json file in marc-in-json format. To write use the json file
uploaded as example
You need to fill the fields 'rules' and 'datarecord'. The field 'rules'
must contains 'override_ext'
To do the call:
 curl -s -u koha:koha --header "Content-Type: application/json"
--header "Accept: application/marc-in-json"
  --request POST
"http://127.0.0.1:8080/api/v1/biblios/XXX/merge; -d @file_with_recod.json
  9) The record in 'biblio_id_to_merge' is deleted now, in biblio XXX now
there are the bibliographic data
 of field 'datarecord' of json file, the return is: return code 200 and
the changed record XXX in marc-in-json format
  10) Go into intranet and do a search. Select two or (better) more record.
  11) Merge them; merge must be a success.
  12) Test with prove -v t/db_dependent/Koha/Biblio.t
  13) Test with prove -v t/db_dependent/api/v1/biblios.t

To test with curl the step 8 you can customize the json file attached in
bugzilla.
The marc-in-json record inside follows the MAR21 standard

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: Zeno Tajoli 
Co-authored-by: Thomas Klausner 
Co-authored-by: Mark Hofstetter <>
Signed-off-by: Jan Kissig 

Bug 33036: Update of test number.

File ../biblios.t was update with a new subutest.
So we need this update to have a 'OK' after test running.

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2024-01-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-12-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #44 from Zeno Tajoli  ---
I check the patches of Jonathan and for me are OK.

I add a new little patch because there is a new test inside
t/db_dependent/API/v1/biblios.t (bug 35574).

Now there is only JSON for inputting a MARC record because inside JSON I also
insert other parameters ["biblio_id_to_merge", rules", "framework_to_use"]

I don't know how to pass them without using JSON.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-12-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #43 from Zeno Tajoli  ---
Created attachment 160302
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160302=edit
Update of test number

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-12-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #42 from Mark Hofstetter  ---
looks ok to me

for testing/using please don't forget to activate RESTBasicAuth

/cgi-bin/koha/admin/preferences.pl?op=search=RESTBasicAuth

cheers and thx to all

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-12-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #41 from Jonathan Druart  ---
1. Added some improvements and missing unit tests

2. Wondering if we should not support more than json for the marc record. Not
considering blocker however (can be done later if needed).

3. Error handling is not the best, but it was bad already (ModBiblio and
DelBiblio erk!) but we improved it.

IMO This can go now, but I would like a last round of test (+ review) from
Mark, domm or Zeno on my follow-ups.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-12-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #40 from Jonathan Druart  ---
Created attachment 159829
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159829=edit
Bug 33036: Improve REST API controller

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-12-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #39 from Jonathan Druart  ---
Created attachment 159828
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159828=edit
Bug 33036: Use Koha::Objects

Better to use Koha::Objects everywhere and have the same pattern for the
different related objects.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-12-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #38 from Jonathan Druart  ---
Created attachment 159827
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159827=edit
Bug 33036: Add more tests

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-12-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #37 from Jonathan Druart  ---
Created attachment 159826
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159826=edit
Bug 33036: Improve merge_with tests

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-11-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Zeno Tajoli  changed:

   What|Removed |Added

 Attachment #159011|0   |1
is obsolete||
 Attachment #159012|0   |1
is obsolete||

--- Comment #36 from Zeno Tajoli  ---
Created attachment 159239
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159239=edit
An example of JSON file to use in testing

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-11-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Zeno Tajoli  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

--- Comment #35 from Zeno Tajoli  ---
Sign off done by Jan Kissig as I see.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-11-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jan Kissig  changed:

   What|Removed |Added

 Attachment #159120|0   |1
is obsolete||

--- Comment #34 from Jan Kissig  ---
Created attachment 159191
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159191=edit
Bug 33036: REST API: Merge biblio records implements merging of records +
attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

This is a slightly improved version of Zenos patch: I (domm) have converted the
code in Koha::Biblio to a more DBICy style and packed it into a transaction (as
requested in Comment 23)

Even the QA script is happy now!

To test:
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) Write a JSON file with inside the field 'biblio_id_to_merge' and the
biblionumber from wihich to merge.
   As example:
   {
 "biblio_id_to_merge" : 9
   }
 6) Execute an API call with correct headers and location. For example:
curl -s -u koha:koha --header "Content-Type: application/json" --header
"Accept: application/marc-in-json"
  --request POST
"http://127.0.0.1:8080/api/v1/biblios/262/merge; -d @file.json
You must to setup the headers and to use a json file with parameters
 7) The record with the id 9 is deleted now, the record with 262 has all
items, etc attached,
the return is: return code 200 and the changed record 262 in
marc-in-json format
 8) It is possible to override biblio data with an external bib record. You
need to put external bib record
into the json file in marc-in-json format. To write use the json file
uploaded as example
You need to fill the fields 'rules' and 'datarecord'. The field 'rules'
must contains 'override_ext'
To do the call:
 curl -s -u koha:koha --header "Content-Type: application/json"
--header "Accept: application/marc-in-json"
  --request POST
"http://127.0.0.1:8080/api/v1/biblios/XXX/merge; -d @file_with_recod.json
  9) The record in 'biblio_id_to_merge' is deleted now, in biblio XXX now
there are the bibliographic data
 of field 'datarecord' of json file, the return is: return code 200 and
the changed record XXX in marc-in-json format
  10) Go into intranet and do a search. Select two or (better) more record.
  11) Merge them; merge must be a success.
  12) Test with prove -v t/db_dependent/Koha/Biblio.t
  13) Test with prove -v t/db_dependent/api/v1/biblios.t

To test with curl the step 8 you can customize the json file attached in
bugzilla.
The marc-in-json record inside follows the MAR21 standard

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: Zeno Tajoli 
Co-authored-by: Thomas Klausner 
Co-authored-by: Mark Hofstetter <>
Signed-off-by: Jan Kissig 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-11-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Thomas Klausner  changed:

   What|Removed |Added

 Attachment #159103|0   |1
is obsolete||

--- Comment #33 from Thomas Klausner  ---
Created attachment 159120
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159120=edit
Bug 33036: REST API: Merge biblio records implements merging of records +
attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

This is a slightly improved version of Zenos patch: I (domm) have converted the
code in Koha::Biblio to a more DBICy style and packed it into a transaction (as
requested in Comment 23)

Even the QA script is happy now!

To test:
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) Write a JSON file with inside the field 'biblio_id_to_merge' and the
biblionumber from wihich to merge.
   As example:
   {
 "biblio_id_to_merge" : 9
   }
 6) Execute an API call with correct headers and location. For example:
curl -s -u koha:koha --header "Content-Type: application/json" --header
"Accept: application/marc-in-json"
  --request POST
"http://127.0.0.1:8080/api/v1/biblios/262/merge; -d @file.json
You must to setup the headers and to use a json file with parameters
 7) The record with the id 9 is deleted now, the record with 262 has all
items, etc attached,
the return is: return code 200 and the changed record 262 in
marc-in-json format
 8) It is possible to override biblio data with an external bib record. You
need to put external bib record
into the json file in marc-in-json format. To write use the json file
uploaded as example
You need to fill the fields 'rules' and 'datarecord'. The field 'rules'
must contains 'override_ext'
To do the call:
 curl -s -u koha:koha --header "Content-Type: application/json"
--header "Accept: application/marc-in-json"
  --request POST
"http://127.0.0.1:8080/api/v1/biblios/XXX/merge; -d @file_with_recod.json
  9) The record in 'biblio_id_to_merge' is deleted now, in biblio XXX now
there are the bibliographic data
 of field 'datarecord' of json file, the return is: return code 200 and
the changed record XXX in marc-in-json format
  10) Go into intranet and do a search. Select two or (better) more record.
  11) Merge them; merge must be a success.
  12) Test with prove -v t/db_dependent/Koha/Biblio.t
  13) Test with prove -v t/db_dependent/api/v1/biblios.t

To test with curl the step 8 you can customize the json file attached in
bugzilla.
The marc-in-json record inside follows the MAR21 standard

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: Zeno Tajoli 
Co-authored-by: Thomas Klausner 
Co-authored-by: Mark Hofstetter <>
Signed-off-by: Jan Kissig 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Thomas Klausner  changed:

   What|Removed |Added

 CC||d...@plix.at

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #32 from Thomas Klausner  ---
Created attachment 159103
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159103=edit
Bug 33036: REST API: Merge biblio records implements merging of records +
attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

This is a slightly improved version of Zenos patch: I (domm) have converted the
code in Koha::Biblio to a more DBICy style and packed it into a transaction (as
requested in Comment 23)

The QA script complains about files being less tidy, but if we add the perltidy
changes to this commit I'm afraid the actual change will be much less clear to
review. So I did not run perltidy on the changed files.

To test:
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) Write a JSON file with inside the field 'biblio_id_to_merge' and the
biblionumber from wihich to merge.
   As example:
   {
 "biblio_id_to_merge" : 9
   }
 6) Execute an API call with correct headers and location. For example:
curl -s -u koha:koha --header "Content-Type: application/json" --header
"Accept: application/marc-in-json"
  --request POST
"http://127.0.0.1:8080/api/v1/biblios/262/merge; -d @file.json
You must to setup the headers and to use a json file with parameters
 7) The record with the id 9 is deleted now, the record with 262 has all
items, etc attached,
the return is: return code 200 and the changed record 262 in
marc-in-json format
 8) It is possible to override biblio data with an external bib record. You
need to put external bib record
into the json file in marc-in-json format. To write use the json file
uploaded as example
You need to fill the fields 'rules' and 'datarecord'. The field 'rules'
must contains 'override_ext'
To do the call:
 curl -s -u koha:koha --header "Content-Type: application/json"
--header "Accept: application/marc-in-json"
  --request POST
"http://127.0.0.1:8080/api/v1/biblios/XXX/merge; -d @file_with_recod.json
  9) The record in 'biblio_id_to_merge' is deleted now, in biblio XXX now
there are the bibliographic data
 of field 'datarecord' of json file, the return is: return code 200 and
the changed record XXX in marc-in-json format
  10) Go into intranet and do a search. Select two or (better) more record.
  11) Merge them; merge must be a success.
  12) Test with prove -v t/db_dependent/Koha/Biblio.t
  13) Test with prove -v t/db_dependent/api/v1/biblios.t

To test with curl the step 8 you can customize the json file attached in
bugzilla.
The marc-in-json record inside follows the MAR21 standard

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: Zeno Tajoli 
Co-authored-by: Thomas Klausner 
Co-authored-by: Mark Hofstetter <>
Signed-off-by: Jan Kissig 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-11-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Zeno Tajoli  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

--- Comment #31 from Zeno Tajoli  ---
A new version that follow the requests given.

To test:
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) Write a JSON file with inside the field 'biblio_id_to_merge' and the 
  biblionumber from wihich to merge.
   As example:
   {
 "biblio_id_to_merge" : 9
   }
 6) Execute an API call with correct headers and location. For example:
curl -s -u koha:koha --header "Content-Type: application/json" --header
"Accept: application/marc-in-json" --request POST
"http://127.0.0.1:8080/api/v1/biblios/262/merge; -d @file.json
You must to setup the headers and to use a json file with parameters
 7) The record with the id 9 is deleted now, the record with 262 has all
items, etc attached, the return is: return code 200 and the changed
record 262 in marc-in-json format
 8) It is possible to override biblio data with an external bib record. You
need to put external bib record into the json file in marc-in-json 
format. To write use the json file uploaded as example
You need to fill the fields 'rules' and 'datarecord'. The field 'rules' 
must contains 'override_ext'
To do the call:
 curl -s -u koha:koha --header "Content-Type: application/json"
--header 
 "Accept: application/marc-in-json" --request POST
"http://127.0.0.1:8080/api/v1/biblios/XXX/merge; -d @file_with_recod.json
  9) The record in 'biblio_id_to_merge' is deleted now, in biblio XXX now 
 there are the bibliographic data of field 'datarecord' of json file, 
 the return is: return code 200 and the changed record XXX in 
 marc-in-json format
  10) Go into intranet and do a search. Select two or (better) more record.
  11) Merge them; merge must be a success.
  12) Test with prove -v t/db_dependent/Koha/Biblio.t
  13) Test with prove -v t/db_dependent/api/v1/biblios.t

To test with curl the step 8 you can customize the json file attached in
bugzilla.
The marc-in-json record inside follows the MAR21 standard

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-11-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #30 from Zeno Tajoli  ---
Created attachment 159012
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159012=edit
Patch that implemnts the end point

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-11-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Zeno Tajoli  changed:

   What|Removed |Added

 Attachment #157481|0   |1
is obsolete||
 Attachment #157482|0   |1
is obsolete||
 Attachment #157731|0   |1
is obsolete||

--- Comment #29 from Zeno Tajoli  ---
Created attachment 159011
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159011=edit
An example of JSON file to use in testing

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #28 from Zeno Tajoli  ---
Hi Thomas,
could you write here a full example with curl on how do you want the call of
the API ?
I need parmas of curl and headers, json file fields and how to pass the
MARC21/UNIMARC data (a field of the json file?).
To undestand better how to do the work.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #27 from Katrin Fischer  ---
See here too: https://wiki.koha-community.org/wiki/Perltidy

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #26 from Jonathan Druart  ---
(In reply to Zeno Tajoli from comment #25)
> Hi Jonathan Druart,
> 
> are you sure that there are problems with tidying for this patch?
> I use perltidy conf that are in the git archive and I do a check with 
> koha-qa.pl -v 2 -c 1 and I pass the test.

+if($@)
+{   push @errors, $@;
+}   else
+{   if ($rmerge->{'status'}==0)
+{   push @errors, $rmerge->{'error'};
 }

This looks wrong, we have 

  8 # } else {
  9 --cuddled-else

in our .perltidyrc (at the root of Koha src)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #25 from Zeno Tajoli  ---
Hi Jonathan Druart,

are you sure that there are problems with tidying for this patch?
I use perltidy conf that are in the git archive and I do a check with 
koha-qa.pl -v 2 -c 1 and I pass the test.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #24 from Tomás Cohen Arazi  ---
(In reply to Jonathan Druart from comment #23)
> 
> 6. Not sure about the response of the endpoint, IMO it should return the
> biblio generated by the merge.
> Also the response contains "merged" and "kept" with the IDs we passed, it
> does not seem needed.

I'd say it needs to return the resulting object, with the Location header
pointing to the /biblios/:biblio_id endpoint (instead of the /merge)

> Note that Tomas suggested on the list:
> POST /biblios/123/merges
> {
> "biblio_id": 456,
> "rules": ?
> }

Yes, we certainly need a way to specify what to pick from which record... An
initial implementation could just implement a full overwrite (i.e. effectively
moving the items and removing the biblio) but it needs to allow, by design, for
future enhancements like this, so it is more useful.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #23 from Jonathan Druart  ---
Hi Zeno,

Some QA feedbacks:

1. Please tidy new code (using perltidy
https://wiki.koha-community.org/wiki/Perltidy)

2. Those lines are non needed and must be removed:

+use C4::Serials qw( CountSubscriptionFromBiblionumber ); (duplicate)

+#my $biblio = Koha::Biblios->find($self->biblionumber);

+#say Dumper $results;

3. New REST API endpoint needs to be covered by tests

4.
+  - $ref: "../swagger.yaml#/parameters/marc_schema_header"
=> You are not using it (x-record-schema) in the controller code

5. The error handling is wrong:
  a. You should raise an exception instead of returning
  b. You should run the whole merge code in a transaction

6. Not sure about the response of the endpoint, IMO it should return the biblio
generated by the merge.
Also the response contains "merged" and "kept" with the IDs we passed, it does
not seem needed.

Note that Tomas suggested on the list:
POST /biblios/123/merges
{
"biblio_id": 456,
"rules": ?
}

We will need his feedback here.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #22 from Jan Kissig  ---
Tested merge with
- attached holds
- attached items
- attached subscription
- attached order
- POSTing XML

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #21 from Jan Kissig  ---
Created attachment 157731
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157731=edit
Bug 33036: REST API: Merge biblio records implements merging of records +
attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

To test:
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
   POST /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  is deleted now, the record
with 
   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  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

To do test with curl you canuse the MARCXML (MARC21) file attached in bugzilla.

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: d...@plix.at
Signed-off-by: Jan Kissig 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jan Kissig  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Zeno Tajoli  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

--- Comment #20 from Zeno Tajoli  ---
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  is deleted now, the record
with 
   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  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.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Zeno Tajoli  changed:

   What|Removed |Added

 Attachment #152678|0   |1
is obsolete||

--- Comment #19 from Zeno Tajoli  ---
Created attachment 157482
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157482=edit
patch to implement the feature

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #18 from Zeno Tajoli  ---
Created attachment 157481
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157481=edit
A MARC21 record in MARCXML format

You can use MARCXML file for tests

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #17 from Jonathan Druart  ---
(In reply to Zeno Tajoli from comment #16)
> Hi Jonathan, I'm trying to develop this patch so I ask same explanation
> about your requests:
> 1)'first move the code to a module'.
> In this patch the new verb 'merge' is inside an existing module,
> 'Koha/REST/V1/Biblios.pm' and it is also a Mojo controller.
> So the code is in the correct place.

To make it reusable from another place than the REST API.
It needs to be placed into Koha::Biblio (see Koha::Patron::merge_with)

> 3)'then call that method from merge.pl and your Mojo controller'
> Yes, I need to change the merge.pl and use the REST API instead of the
> present code.

No, you need to call Koha::Biblio::merge_with from merge.pl and the REST API
controller.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-10-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Zeno Tajoli  changed:

   What|Removed |Added

 CC||ztaj...@gmail.com

--- Comment #16 from Zeno Tajoli  ---
Hi Jonathan, I'm trying to develop this patch so I ask same explanation about
your requests:
1)'first move the code to a module'.
In this patch the new verb 'merge' is inside an existing module,
'Koha/REST/V1/Biblios.pm' and it is also a Mojo controller.
So the code is in the correct place.

2)'provide test'
OK, to do.

3)'then call that method from merge.pl and your Mojo controller'
Yes, I need to change the merge.pl and use the REST API instead of the present
code.

Is it a correct work plan?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #15 from Jonathan Druart  ---
Also don't forget to run the QA script:

 FAIL   Koha/REST/V1/Biblios.pm
   FAIL   forbidden patterns
forbidden pattern: Use of $c->validation in API controllers
should be avoided (bug 33556) (line 876)
forbidden pattern: Use of $c->validation in API controllers
should be avoided (bug 33556) (line 877)
   WARN   tidiness
The file is less tidy than before (bad/messy lines before: 138,
now: 175)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #14 from Jonathan Druart  ---
1. Tests are missing

2. You are duplicating code. The correct way to do this is to first move the
code to a module, provide test, then call that method from merge.pl and your
Mojo controller.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.druart+koha@gmail.
   ||com

--- Comment #13 from Jonathan Druart  ---
"From: Tomas Cohen Arazi "

This does not seem correct.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Katrin Fischer  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=15368

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jan Kissig  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jan Kissig  changed:

   What|Removed |Added

 Attachment #152659|0   |1
is obsolete||

--- Comment #12 from Jan Kissig  ---
Created attachment 152678
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152678=edit
Bug 33036: REST API: Merge biblio records implements merging of records +
attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

To Test:
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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/9;
6) the record with the id  is deleted now, the record with

   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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/2; -d @marcfile.xml
8) now also the content of the record with  is replaced with the
content of the MARCXML file
9) Sign off.
10) Thx

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: d...@plix.at
Signed-off-by: Jan Kissig 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Mark Hofstetter  changed:

   What|Removed |Added

 Attachment #152472|0   |1
is obsolete||

--- Comment #11 from Mark Hofstetter  ---
Created attachment 152659
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152659=edit
Bug 33036: REST API: Merge biblio records implements merging of records +
attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

To Test:
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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/9;
6) the record with the id  is deleted now, the record with

   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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/2; -d @marcfile.xml
8) now also the content of the record with  is replaced with the
content of the MARCXML file
9) Sign off.
10) Thx

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: d...@plix.at

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Mark Hofstetter  changed:

   What|Removed |Added

 Status|Signed Off  |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jan Kissig  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

--- Comment #10 from Jan Kissig  ---
When using Postman instead of curl to send HTTP-request (body:raw, type:xml)
with a body like this:


http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
xmlns="http://www.loc.gov/MARC21/slim;>
  00224nam a22001097a 4500
  OSt
  20230412064312.0
  230412b  00| 0 eng
d
  
Ost
  
  
NewTitle
  


f.e. PUT http://localhost:8081/api/v1/biblios/262/merge/6 I get the error

{
"errors": [
{
"message": "Expected object - got string.",
"path": "/body"
}
],
"status": 400
}

The proposed way just works fine:
 7) optionally a full MARCXML record may be sent as body of the API call
   curl  -s -u koha:koha -X PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/2; -d @marcfile.xml

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jan Kissig  changed:

   What|Removed |Added

 Attachment #152447|0   |1
is obsolete||

--- Comment #9 from Jan Kissig  ---
Created attachment 152472
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152472=edit
Bug 33036: REST API: Merge biblio records implements merging of records +
attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

To Test:
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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/9;
6) the record with the id  is deleted now, the record with

   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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/2; -d @marcfile.xml
8) now also the content of the record with  is replaced with the
content of the MARCXML file
9) Sign off.
10) Thx

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: d...@plix.at
Signed-off-by: Jan Kissig 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Mark Hofstetter  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Mark Hofstetter  changed:

   What|Removed |Added

 Attachment #152438|0   |1
is obsolete||
 Attachment #152440|0   |1
is obsolete||

--- Comment #8 from Mark Hofstetter  ---
Created attachment 152447
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152447=edit
Bug 33036: REST API: Merge biblio records implements merging of records +
attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

To Test:
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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/9;
6) the record with the id  is deleted now, the record with

   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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/2; -d @marcfile.xml
8) now also the content of the record with  is replaced with the
content of the MARCXML file
9) Sign off.
10) Thx

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: d...@plix.at

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Mark Hofstetter  changed:

   What|Removed |Added

 Attachment #152439|0   |1
is obsolete||

--- Comment #7 from Mark Hofstetter  ---
Created attachment 152440
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152440=edit
Bug 33036: REST API: Merge biblio records implements merging of records +
attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

To Test:
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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/9;
6) the record with the id  is deleted now, the record with

   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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/2; -d @marcfile.xml
8) now also the content of the record with  is replaced with the
content of the MARCXML file
9) Sign off.
10) Thx

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: d...@plix.at

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Mark Hofstetter  changed:

   What|Removed |Added

 Status|Needs Signoff   |ASSIGNED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Mark Hofstetter  changed:

   What|Removed |Added

 Attachment #152437|0   |1
is obsolete||

--- Comment #6 from Mark Hofstetter  ---
Created attachment 152439
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152439=edit
Bug 33036: REST API: Merge biblio records implements merging of records +
attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

To Test:
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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/9;
6) the record with the id  is deleted now, the record with

   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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/2; -d @marcfile.xml
8) now also the content of the record with  is replaced with the
content of the MARCXML file
9) Sign off.
10) Thx

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: d...@plix.at

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #5 from Mark Hofstetter  ---
Created attachment 152438
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152438=edit
Bug 33036: REST API: Merge biblio records

implements merging of records + attached items, subscriptions etc via the API
as an alternative to the web interface: cgi-bin/koha/cataloguing/merge.pl

To Test:
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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/9;
6) the record with the id  is deleted now, the record with

   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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/2; -d @marcfile.xml
8) now also the content of the record with  is replaced with the
content of the MARCXML file
9) Sign off.
10) Thx

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: d...@plix.at

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Mark Hofstetter  changed:

   What|Removed |Added

 Attachment #152436|0   |1
is obsolete||

--- Comment #4 from Mark Hofstetter  ---
Created attachment 152437
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152437=edit
Bug 33036: REST API: Merge biblio records implements merging of records +
attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

To Test:
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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/9;
6) the record with the id  is deleted now, the record with

   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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/2; -d @marcfile.xml
8) now also the content of the record with  is replaced with the
content of the MARCXML file
9) Sign off.
10) Thx

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: d...@plix.at

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Mark Hofstetter  changed:

   What|Removed |Added

   Patch complexity|--- |Medium patch
 Status|ASSIGNED|Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #3 from Mark Hofstetter  ---
Created attachment 152436
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152436=edit
Bug 33036: REST API: Merge biblio records implements merging of records +
attached items, subscriptions etc via the API as an alternative to the web
interface: cgi-bin/koha/cataloguing/merge.pl

To Test:
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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/9;
6) the record with the id  is deleted now, the record with

   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 PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/2; -d @marcfile.xml
8) now also the content of the record with  is replaced with the
content of the MARCXML file
9) Sign off.
10) Thx

Sponsored-by: Technische Hochschule Wildau
Co-authored-by: d...@plix.at

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #2 from Jan Kissig  ---
By "additionally we need a list (json, csv ..) of the records that should be
taken from the biblio_id_to_merge record" did you mean a list of fields from
the biblio_id_to_merge record?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Mark Hofstetter  changed:

   What|Removed |Added

  Change sponsored?|Seeking developer   |Sponsored
 Status|NEW |ASSIGNED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

--- Comment #1 from Mark Hofstetter  ---
I'd suggest the following url

PUT: /biblios/{biblio_id}/merge/{biblio_id_to_merge}

where biblio_id is the biblio_id of the record to be kept

additionally we need a list (json, csv ..) of the records that should be taken
from the biblio_id_to_merge record

output should be a list from the "report_records" from the
preference('MergeReportFields')

ideally the whole logic of "merge" from 
/cataloguing/merge.pl

starting with
86 # Rewriting the leader

should go into the storage class
package Koha::Biblio;

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-05-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Mark Hofstetter  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |k...@trust-box.at
   |ity.org |
 CC||k...@trust-box.at

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-02-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Katrin Fischer  changed:

   What|Removed |Added

 CC||katrin.fisc...@bsz-bw.de,
   ||michaela.sie...@kit.edu

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 33036] REST API: Merge biblio records

2023-02-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jan Kissig  changed:

   What|Removed |Added

  Change sponsored?|--- |Seeking developer

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/