Bug 15838

Summary: syspref SubscriptionDuplicateDroppedInput does not work for all fields
Product: Koha Reporter: Alex Arnaud <alex.arnaud>
Component: SerialsAssignee: Alex Arnaud <alex.arnaud>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: brendan, colin.campbell, f.demians, jonathan.druart, julian.maurice, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 15838 - Subscription duplicating: Reset fields from SubscriptionDuplicateDroppedInput syspef by getting them using name instead of id
Bug 15838 - Subscription duplicating: Reset fields from SubscriptionDuplicateDroppedInput syspef by getting them using name instead of id
Bug 15838 - Subscription duplicating: Reset fields from SubscriptionDuplicateDroppedInput syspef by getting them using name instead of id

Description Alex Arnaud 2016-02-17 11:08:01 UTC
Some fields (especially on second page?) are not reset when duplicating a subscription despite they are in SubscriptionDuplicateDroppedInput system preference. The reason is that these fields have an id different than the name.
Comment 1 Alex Arnaud 2016-02-17 11:27:42 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-03-24 09:54:11 UTC
Verified bug with startdate and enddate on second page.
Comment 3 Marc Véron 2016-03-24 09:58:18 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2016-03-24 21:54:40 UTC
Created attachment 49565 [details] [review]
Bug 15838 - Subscription duplicating: Reset fields from SubscriptionDuplicateDroppedInput syspef by getting them using name instead of id

How I tested:
Verified bug with start and end date (were not cleared without patch).
After applying the patch all fields defined in SubscriptionDuplicateDroppedInput
were cleared as expected.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2016-03-24 21:56:08 UTC
This patch is not perfect, but the feature is so ugly (I have written it...) and so poorly documented that I am almost sure nobody uses it.
The id/name does not match the db column in all cases, I don't understand how a librarian could guess them!
Comment 6 Brendan Gallagher 2016-03-25 21:13:55 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks!
Comment 7 Julian Maurice 2016-04-07 05:29:55 UTC
Patch pushed to 3.22.x, will be in 3.22.6
Comment 8 Frédéric Demians 2016-04-27 15:38:35 UTC
Pushed to 3.20.x, will be in 3.20.11.