Koha/Koha
Tomas Cohen Arazi ebf7b6471f
Bug 31797: Add DELETE /items/:item_id endpoint
This patch adds the mentioned endpoint. The controller relies on
Koha::Item->safe_to_delete for checks and uses `safe_delete` as
additem.pl does.

The required permissions are edit_catalogue.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/items.t
=> SUCCESS: Tests pass!
3. Play with item deletion using a REST tool like Postman
=> SUCCESS: All works as expected
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-01-30 12:20:44 -03:00
..
Account Bug 29021: (QA follow-up) Fix for new parameter, add unit test 2023-01-30 10:39:14 -03:00
Acquisition Bug 32417: Allow NULL in biblionumber in $order->store 2022-12-13 09:14:13 -03:00
App
ArticleRequest
Auth Bug 31378: (QA follow-up) Defer store until JSON fields are populated 2022-11-18 12:29:55 -03:00
Authority
BackgroundJob Bug 32394: (follow-up) Add param for Koha::BackgroundJob::StageMARCForImport->enqueue 2022-12-16 09:00:45 -03:00
Biblio Bug 31889: (follow-up) Correct item order 2022-11-07 07:53:34 -03:00
BiblioUtils Bug 29697: Use flag embed_items 2022-07-22 15:24:11 -03:00
Cache Bug 29623: (QA follow-up) Add POD to Koha::Cache::Lite 2022-06-14 08:26:59 -03:00
Cash Bug 27779: Group payouts by type of debit they're applied against 2022-08-08 13:37:25 -03:00
Charges
Checkouts Bug 28854: Improve lost details display for bundle items 2022-07-13 10:35:36 -03:00
Club
CodeList/Unimarc Bug 30941: (QA follow-up) Only export what is needed 2022-08-19 11:00:42 -03:00
Config
Course
Database Bug 31619: add title back to list of OPACSuggestionMandatoryFields options 2022-10-11 10:11:01 -03:00
Edifact
ERM Bug 32030: Fix perlcritic errors 2022-11-09 09:48:26 -03:00
Exceptions Bug 31080: Prevent bundles from being nested 2022-11-22 16:28:20 -03:00
Exporter Bug 29697: Fix t/db_dependent/Exporter/Record.t 2022-07-25 09:30:35 -03:00
ExternalContent
Filter/MARC Revert "Bug 15187: Index 880 in Zebra the same as Elasticsearch" 2022-10-24 14:03:44 -03:00
Hold Bug 22456: Add Koha::Hold::CancellationRequest(s) class(es) 2022-07-29 15:28:20 -03:00
Illrequest Bug 30484: Implement support for ILL request updates 2022-09-23 09:18:45 -03:00
Import Bug 32054: Add get_import_record_matches object method and use it 2023-01-18 15:58:19 +00:00
Indexer
Item Bug 24606: (QA follow-up) Add test for encoding/decoding 2022-11-18 12:04:27 -03:00
Library Bug 29922: Make get_search_groups return results sorted by title 2022-07-18 15:11:35 -03:00
List
MetadataRecord
Middleware
Misc
Notice
Number
OAI/Server Bug 30921: (QA follow-up) Remove unnecessary if 2022-09-12 16:26:35 -03:00
Object
Objects
Old Bug 26648: Prevent explosion in notices on missing item 2022-10-12 09:56:43 -03:00
Patron Bug 31577: Use patron category multi-select for OpacHiddenItemsExceptions system preference 2022-10-24 14:15:27 -03:00
Patrons Bug 27920: Add ability to update patron expiration dates when importing patrons 2022-11-09 14:37:07 -03:00
pdfformat Bug 31257: (QA follow-up) Fix some typos 2022-10-11 10:44:11 -03:00
Plugins Bug 29672: Clear cache of enabled plugins when a plugin's state change 2022-11-03 11:28:16 -03:00
RecordProcessor
REST Bug 31797: Add DELETE /items/:item_id endpoint 2023-01-30 12:20:44 -03:00
Result
Schema Bug 32154: DBIC schema 2022-11-16 09:24:09 -03:00
SearchEngine Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog 2022-10-21 11:15:18 -03:00
Serial
Sitemapper
SMS
SMTP
Subscription
SuggestionEngine Bug 31069: Remove ExplodedTerms dependency on templates 2022-07-18 12:37:35 -03:00
Tags
Template/Plugin Bug 31378: Rename Auth Provider to Identity Provider and add Client.t tests 2022-11-08 14:39:51 -03:00
UI Bug 32550: (bug 28445 follow-up) Fix 'Clear on loan' link on item batch mod 2023-01-18 15:59:46 +00:00
Util Bug 30678: (follow-up) Add oclc_number routine and friends 2022-07-22 14:58:11 -03:00
XSLT Bug 12758: Add new module call in Koha::XSLT::Base 2022-11-09 09:52:25 -03:00
Z3950Responder Bug 24295: Remove GetTransfer from Z3950Responder 2022-08-26 15:42:07 -03:00
Account.pm Bug 31895: (QA follow-up) Rollback change, add comment 2022-11-07 11:16:28 -03:00
ActionLog.pm
ActionLogs.pm
AdditionalContent.pm
AdditionalContents.pm Bug 29144: Add $contents->find_best_match, $library->opac_info 2022-09-16 09:55:19 -03:00
AdditionalField.pm
AdditionalFields.pm
AdditionalFieldValue.pm
AdditionalFieldValues.pm
AdvancedEditorMacro.pm
AdvancedEditorMacros.pm
ApiKey.pm
ApiKeys.pm
ArticleRequest.pm
ArticleRequests.pm
AudioAlert.pm
AudioAlerts.pm
AuthorisedValue.pm
AuthorisedValueCategories.pm
AuthorisedValueCategory.pm
AuthorisedValues.pm
Authorities.pm
Authority.pm Bug 29897: Remove 'linkage' leftover 2022-08-09 10:58:48 -03:00
AuthUtils.pm Bug 29744: (QA follow-up) Call psgi_env in OO style 2022-09-22 08:11:58 -03:00
BackgroundJob.pm Bug 32561: Prevent worker to run with unecessary modules in memory 2023-01-27 15:15:47 -03:00
BackgroundJobs.pm Bug 31969: Use filter_by_last_update 2022-11-25 09:40:09 -03:00
Biblio.pm Bug 16522: (follow-up) If no 773$w, try to return host record 2023-01-30 12:10:12 -03:00
BiblioFramework.pm
BiblioFrameworks.pm
Biblioitem.pm
Biblioitems.pm
Biblios.pm
BiblioUtils.pm Bug 29697: Don't crash ES reindex if a record is wrong 2022-07-22 15:24:12 -03:00
Cache.pm
Caches.pm
Calendar.pm
Checkout.pm Bug 30612: Rename other occurrences 2022-08-01 09:59:05 -03:00
Checkouts.pm
CirculationRule.pm
CirculationRules.pm Bug 23012: (QA follow-up) Combine method to get both values 2022-10-24 17:43:29 -03:00
Cities.pm
City.pm
ClassSortRule.pm
ClassSortRules.pm
ClassSource.pm
ClassSources.pm
ClassSplitRule.pm
ClassSplitRules.pm
Club.pm
Clubs.pm
Config.pm
CookieManager.pm Bug 31250: (QA follow-up) The future will be easier 2022-09-12 15:34:11 -03:00
Course.pm
Courses.pm
CoverImage.pm
CoverImages.pm
CsvProfile.pm
CsvProfiles.pm
CurbsidePickup.pm Bug 30650: (QA follow-up) Some higher-level methods usage 2022-07-29 15:38:51 -03:00
CurbsidePickupIssue.pm Bug 30650: Add some useful modules and tests 2022-07-29 14:59:57 -03:00
CurbsidePickupIssues.pm Bug 30650: Add some useful modules and tests 2022-07-29 14:59:57 -03:00
CurbsidePickupOpeningSlot.pm Bug 30650: Add some useful modules and tests 2022-07-29 14:59:57 -03:00
CurbsidePickupOpeningSlots.pm Bug 30650: Add some useful modules and tests 2022-07-29 14:59:57 -03:00
CurbsidePickupPolicies.pm Bug 30650: Add some useful modules and tests 2022-07-29 14:59:57 -03:00
CurbsidePickupPolicy.pm Bug 30650: Allow to restrict curbside pickup for waiting holds only 2022-07-29 15:00:31 -03:00
CurbsidePickups.pm Bug 30650: Add filter_by_scheduled_today 2022-07-29 15:00:47 -03:00
Database.pm
DateUtils.pm Bug 30717: (QA follow-up) Move to module 2022-05-13 15:41:55 -10:00
Desk.pm
Desks.pm
EDI.pm Bug 27017: (QA follow-up) Don't die if aqorders.biblionumber is null 2022-10-27 15:03:49 -03:00
Edifact.pm
Email.pm
Encryption.pm Bug 31053: Add Context module to Koha::Encryption 2022-06-27 11:46:22 -03:00
Exception.pm
Exceptions.pm Bug 31378: Add 'parameter' parameter to Koha::Exceptions::MissingParameter 2022-11-08 14:31:15 -03:00
ExternalContent.pm
FrameworkPlugin.pm
Hold.pm Bug 31894: Extend after_hold_action hook 2022-11-09 10:05:32 -03:00
Holds.pm Bug 32529: Add Koha::Holds->filter_by_found 2023-01-05 09:21:10 -03:00
I18N.pm Bug 30941: Add cataloguing plugins for 146$bcdef (UNIMARC) 2022-08-19 08:55:09 -03:00
Illcomment.pm
Illcomments.pm
Illrequest.pm Bug 22321: Fix store() crash when modifying borrowernumber of a new ILL request 2022-10-24 17:33:18 -03:00
Illrequestattribute.pm
Illrequestattributes.pm
Illrequests.pm
ImportBatch.pm
ImportBatches.pm
ImportBatchProfile.pm
ImportBatchProfiles.pm
Item.pm Bug 30254: Don't charge overdue fines unless some fine exists 2023-01-30 10:36:30 -03:00
Items.pm Bug 31105: Holds to pull counts items from other branches when independentbranches is active 2022-09-23 09:44:18 -03:00
ItemType.pm
ItemTypes.pm
KeyboardShortcut.pm
KeyboardShortcuts.pm
Libraries.pm
Library.pm Bug 29144: Add $contents->find_best_match, $library->opac_info 2022-09-16 09:55:19 -03:00
Linktracker.pm
Localization.pm
Localizations.pm
Logger.pm Bug 22678: (follow-up) Array ref expected in context key 2022-10-24 14:37:05 -03:00
Manual.pm Bug 31162: (QA follow-up) Use new WRAPPPERs and fix help link 2022-10-18 10:21:03 -03:00
MarcOverlayRule.pm
MarcOverlayRules.pm
MarcSubfieldStructure.pm
MarcSubfieldStructures.pm
MessageAttribute.pm
MessageAttributes.pm
MetadataIterator.pm
MetadataRecord.pm Bug 30813: (follow-up) Correct C4::Breeding call 2022-06-08 11:40:31 -03:00
MetaSearcher.pm Bug 30813: (QA follow-up) Adjust three use statements 2022-06-08 11:40:32 -03:00
MoreUtils.pm
OAuth.pm
OAuthAccessToken.pm
OAuthAccessTokens.pm
Object.pm Bug 26635: (follow-up) Rename av_expand to strings 2022-11-09 14:01:02 -03:00
Objects.pm
Patron.pm Bug 25936: Add option to send password change notices 2022-10-03 14:25:38 -03:00
Patrons.pm Bug 31937: Fix Patrons::search_unsubscribed - sharpen condition 2022-11-17 13:41:24 -03:00
Plugins.pm Bug 29672: (QA follow-up) Add POD 2022-11-03 11:29:43 -03:00
ProblemReport.pm
ProblemReports.pm
PseudonymizedTransaction.pm
PseudonymizedTransactions.pm
Quote.pm
Quotes.pm
Rating.pm
Ratings.pm
RDF.pm
Recall.pm Bug 30823: Filling recalls uses 'FILL' action in action logs 2022-07-01 16:09:13 -03:00
Recalls.pm Bug 31896: New after_recall_action hook 2022-11-09 14:34:41 -03:00
RecordProcessor.pm
Report.pm Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
Reports.pm
Review.pm
Reviews.pm
Schema.pm
Script.pm
SearchEngine.pm
SearchField.pm
SearchFields.pm
SearchFilter.pm Bug 17170: (QA follow-up) Spec cleanup 2022-10-21 11:15:22 -03:00
SearchFilters.pm Bug 17170: DB Updates 2022-10-21 11:15:13 -03:00
SearchMarcMap.pm
SearchMarcMaps.pm
Serial.pm
Serials.pm
SharedContent.pm
SimpleMARC.pm Bug 31644: Check if subfield defined, not for truth 2022-10-24 11:53:18 -03:00
Sitemapper.pm
Statistic.pm
Statistics.pm
StockRotationItem.pm Bug 30518: Correct DateTime maths for needs_advancing 2022-04-19 21:25:50 -10:00
StockRotationItems.pm
StockRotationRota.pm
StockRotationRotas.pm
StockRotationStage.pm
StockRotationStages.pm
Subscription.pm
Subscriptions.pm
Suggestion.pm Bug 31374: (follow-up) change private note to staff_note and reorder columns 2022-09-07 13:32:51 -07:00
SuggestionEngine.pm
Suggestions.pm Bug 30663: Add Koha::Suggestions helper methods 2022-05-05 10:26:41 -03:00
Tag.pm
Tags.pm
Token.pm Bug 27849: (follow-up) Add test 2022-08-01 09:53:35 -03:00
TrackedLink.pm
TrackedLinks.pm
UploadedFile.pm
UploadedFiles.pm
Uploader.pm
Virtualshelf.pm Bug 29955: Fix method import issues 2022-08-22 13:06:18 -03:00
Virtualshelfcontent.pm
Virtualshelfcontents.pm
Virtualshelfshare.pm Bug 25498: (QA follow-up) Rename virtualshelfshare->patron 2022-07-19 11:25:26 -03:00
Virtualshelfshares.pm
Virtualshelves.pm Bug 31288: (QA follow-up) Check userenv in disown_or_delete 2022-08-03 11:44:07 -03:00
Z3950Responder.pm
Z3950Server.pm
Z3950Servers.pm