]> git.koha-community.org Git - koha.git/commit
Bug 30904: (bug 24387 follow-up) Fix library modification of additional contents
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 8 Jun 2022 09:56:30 +0000 (11:56 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 13 Jun 2022 14:05:27 +0000 (11:05 -0300)
commitd5fdd1217c74757d6b3d374912b158912b0810d9
treebaf0b70701d0129a2af64258679a3293a62b9b05
parentc16e366af58bd41783a478bf9d7d8fc3257bc874
Bug 30904: (bug 24387 follow-up) Fix library modification of additional contents

Modifying an existing element of additional content (News) by changing
the library causes a duplication of the entry on the Additional contents
(News) list.  A subsequent attempt of deleting one of the entries results
in deleting both of them.  This is due to the fact that after
the unwanted duplication all the  entries share the same
additional_contents.code.

Test plan
=========

1. Create a piece of news under Tools > News.
2. After having saved it make a modification by changing the library.
   It should result in two rows in the table.
3. Delete one of the lines with Delete button.  Both lines will
   disappear.
4. Apply the patch.
5. Repeat the steps 1 and 2.  Only the one (the modified) entry should be
   present in the table.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt
tools/additional-contents.pl