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 <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Tomas Cohen Arazi 2024-12-11 14:09:40 -03:00 committed by Katrin Fischer
parent 51e42cde54
commit 5d59ec0baa
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ sub to_api_mapping {
seriestitle => 'series_title',
copyrightdate => 'copyright_date',
datecreated => 'creation_date',
deleted_on => 'timestamp',
timestamp => 'deleted_on',
};
}