]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Wed, 13 Jul 2022 19:35:44 +0000 (19:35 +0000)
commit35dff9cbb44e0038f458620db4ff34a924e688c5
treeefa1a5a49a86e1aa8b15f0d31f7e64394c89a1fb
parenta525e77f4cf78d0d3112f40e32d74eb0bc14f85d
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>
(cherry picked from commit d5fdd1217c74757d6b3d374912b158912b0810d9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt
tools/additional-contents.pl