Bug 15367

Summary: Batch patron modification: Data loss with multiple repeatable patron attributes
Product: Koha Reporter: Marc Véron <veron>
Component: PatronsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low CC: brendan, f.demians, gmcharlt, jonathan.druart, julian.maurice, katrin.fischer, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12636
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 21083    
Attachments: Bug 15367: Do not display repeatable patron attributes in the batch patron modification
[SIGNED-OFF] Bug 15367: Do not display repeatable patron attributes in the batch patron modification
[PASSED QA] Bug 15367: Do not display repeatable patron attributes in the batch patron modification

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.