Bug 15367 - Batch patron modification: Data loss with multiple repeatable patron attributes
Summary: Batch patron modification: Data loss with multiple repeatable patron attributes
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low critical
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 21083
  Show dependency treegraph
 
Reported: 2015-12-14 09:18 UTC by Marc Véron
Modified: 2020-05-21 13:12 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 15367: Do not display repeatable patron attributes in the batch patron modification (1.47 KB, patch)
2015-12-21 12:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15367: Do not display repeatable patron attributes in the batch patron modification (1.58 KB, patch)
2015-12-21 13:24 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 15367: Do not display repeatable patron attributes in the batch patron modification (1.64 KB, patch)
2016-01-07 22:20 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2015-12-14 09:18:55 UTC
To reproduce:

- Create a patron attribute type that is repeatable, e.g. HOBBIES
- Edit a patron and add multiple values of this type, e.g.
  Skating, Skiing, Swimming
- Do a batch update for this patron with three values for
  the attribute, e.g. 
  Reading, Jogging, Surfing
- Go back to patron's detail page. 
- Result: Only one attribute is set (Surfing)
  (Expected: All 3 attributes are updated)

- Restore the original values Skating, Skiing, Swimming
  Do the batch modification with one attribute only, e.g.
  Painting
- Go back to patron's detail page
- Result: Only one attribute is set (Painting)
  (Expected: Painting, Skiing, Swimming)

Additionally, exclusive attributes can be repeated in batch update, result is similar as above (last attribute is taken).
Expected: Exclusive attributes should not be repeatable in batch update.
Comment 1 Jonathan Druart 2015-12-21 12:28:54 UTC Comment hidden (obsolete)
Comment 2 Bernardo Gonzalez Kriegel 2015-12-21 13:24:13 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-01-07 22:20:15 UTC
Created attachment 46409 [details] [review]
[PASSED QA] Bug 15367: Do not display repeatable patron attributes in the batch patron modification

The repeatable patron attributes are not correctly managed and can cause
data lost. To avoid that, the easier way is not to display them in the
batch patron modification tool.
This should be implemented, as a new enhancement.

Test plan:
Create some patron attributes, some should be repeatable.
Use the batch patron modification tool to modify patrons.
With this patch, the patron attributes marked as repeatable won't be
display anymore.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, no koha-qa errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Brendan Gallagher 2016-01-12 15:36:58 UTC
Pushed to master - Thanks
Comment 5 Jonathan Druart 2016-01-12 15:40:41 UTC
Note: this could be implemented.
Comment 6 Julian Maurice 2016-01-15 08:00:39 UTC
Patch pushed to 3.22.x, will be in 3.22.2
Comment 7 Frédéric Demians 2016-01-25 16:25:21 UTC
This patch has been pushed to 3.20.x, will be in 3.20.8.