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 Bug 9827: remove 'insecure' system preference 2013-03-19 21:46:34 -04:00
members Bug 12833: Patron search should search on extended attributes 2014-09-09 10:08:59 -03:00
authentication Fix FSF address in directory svc/ 2010-03-16 20:17:51 -04:00
bib Bug 12590 - Support deletion of biblio in svc API 2014-10-27 11:13:49 -03:00
bib_profile Fix FSF address in directory svc/ 2010-03-16 20:17:51 -04:00
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 Bug 7813: (follow-up) improvements for deleting local cover images 2013-09-21 18:11:13 +00:00
holds Bug 11703: (qa followup) consistency in svc 2014-07-03 12:38:13 -03:00
import_bib Bug 9908 - Fixing OCLC Connexion Client 2013-03-29 21:29:10 -04:00
letters Bug 11742: A letter code should be unique. 2014-06-23 15:19:55 -03:00
new_bib Bug 7729 : svc/new_bib: support ?items=1 to add POSTed items to the new biblio too 2012-07-17 18:12:09 +02:00
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