From 9a7e393f72d8e407bf9187fad69e1f7245204572 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 11 Dec 2024 14:09:40 -0300 Subject: [PATCH] Bug 38678: Fix wrong attribute mapping in Koha::Old::Biblio Because the mapping was defined in the wrong direction, it is not possible to filter results in `GET /deleted/biblios` neither on the `deleted_on` attribute, or even the fallback to DB fields when mappings don't exist, on `timestamp`. To test: 1. Apply the regression tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/deleted_biblios.t => FAIL: A 200 returns a 500 instead 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass, behavior is correct 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi Signed-off-by: David Nind --- Koha/Old/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Old/Biblio.pm b/Koha/Old/Biblio.pm index 204f145647..c2735caa92 100644 --- a/Koha/Old/Biblio.pm +++ b/Koha/Old/Biblio.pm @@ -126,7 +126,7 @@ sub to_api_mapping { seriestitle => 'series_title', copyrightdate => 'copyright_date', datecreated => 'creation_date', - deleted_on => 'timestamp', + timestamp => 'deleted_on', }; } -- 2.39.5