Koha/svc
Petter Goksoyr Asen ca756f44d7 Bug 12590 - Support deletion of biblio in svc API
The /svc endpoint allows you to create and update biblio records.
This patch extends it so that it is also possible to delete a biblio.

Test plan
* Create a new biblio by sending a POST request to /svc/new_bib with a
  marcxml record as request body. Note the biblionumber it gets assigned.
* Make some changes to the marcxml record, and update it by sending
  a POST request to /svc/bib/{bibilonumber}
* Observe that the changes are persisted on the biblio record.
* Now delete the bilblio by sending a DELETE request to
  /svc/bib/{biblionumber}
* Observe that the biblio is indeed gone from the db.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works as described and passes tests and QA script.
I tested using curl for a record with and one without items:

curl -X DELETE 'http://localhost:8080/cgi-bin/koha/svc/bib/2' --cookie /tmp/svc.cookies
<?xml version='1.0' standalone='yes'?>
<response>
  <error>This Biblio has items attached, please delete them first before deleting this biblio </error>
</response>

curl -X DELETE 'http://localhost:8080/cgi-bin/koha/svc/bib/3' --cookie /tmp/svc.cookies
<?xml version='1.0' standalone='yes'?>
<response>
  <status>OK, biblio deleted</status>
</response>

The deletion is processed correctly and the indexes are updated.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-27 11:13:49 -03:00
..
config
members Bug 12833: Patron search should search on extended attributes 2014-09-09 10:08:59 -03:00
authentication
bib Bug 12590 - Support deletion of biblio in svc API 2014-10-27 11:13:49 -03:00
bib_profile
checkin Bug 12662: (follow-up) Ajax-based check in does not work for some system preference settings enabled 2014-07-30 14:29:29 -03:00
checkouts Bug 13020 - Checkouts table default ordering is incorrect 2014-10-19 11:30:58 -03:00
cover_images
holds Bug 11703: (qa followup) consistency in svc 2014-07-03 12:38:13 -03:00
import_bib
letters Bug 11742: A letter code should be unique. 2014-06-23 15:19:55 -03:00
new_bib
renew Bug 11703: (qa followup) consistency in svc 2014-07-03 12:38:13 -03:00
report Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00