[Koha-bugs] [Bug 12590] Support deletion of biblio in svc API

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Oct 25 20:23:54 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12590

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #32697|0                           |1
        is obsolete|                            |

--- Comment #6 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 32736
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32736&action=edit
[PASSED QA] 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 at bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at 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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list