Bug 30972: Don't replace biblio's local cover images when uploading an image's image
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 16 Jun 2022 10:29:14 +0000 (12:29 +0200)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 24 Jun 2022 16:17:41 +0000 (16:17 +0000)
commit5ea5c72edb6cbce81053ba310646ba22c178ef32
treeba506600b357873b73372edb5649843e6ff74dab
parenteae8863fcb37b86a32425525c43d53304423f9cd
Bug 30972: Don't replace biblio's local cover images when uploading an image's image

When attaching a new cover image to an item we should not replace cover
images attached to the bibliographic record if "Replace existing covers"
is ticked.

Test plan:
Attach 1+ image to a bibliographic record
Attach 1 image to an item of this biblio
Attach another image to the item and seect "replace existing covers"
=> Without this patch the images attached to the biblio are removed
=> With this patch applied only the images attached to the image are
removed

Same if you tick the checkbox when attaching an image to the biblio

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e32e7a6c9019ac93217f1b4322076e779d35dec4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
tools/upload-cover-image.pl