Bug 11282 - Not possible to create multiple restrictions from patron details/new restriction overwrites existing
Summary: Not possible to create multiple restrictions from patron details/new restrict...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low blocker (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-21 21:56 UTC by Katrin Fischer
Modified: 2019-06-27 09:24 UTC (History)
5 users (show)

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


Attachments
Bug 11282 - Not possible to create multiple restrictions from patron details/new restriction overwrites existing (1.08 KB, patch)
2013-11-22 13:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11282 - Not possible to create multiple restrictions from patron details/new restriction overwrites existing (1.14 KB, patch)
2013-12-24 13:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 11282 - Not possible to create multiple restrictions from patron details/new restriction overwrites existing (1.39 KB, patch)
2013-12-26 10:40 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 11282 - Not possible to create multiple restrictions from patron details/new restriction overwrites existing (1.39 KB, patch)
2013-12-26 10:40 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 Katrin Fischer 2013-11-21 21:56:13 UTC
To test:
- Create a patron
- Create a MANUAL restriction (former debarred flag)
- Check it displays in the patron record
- Try adding another (Using one of the edit links - not the restriction tab on the checkouts page)
- The new restriction overwrote the existing one instead of creating another
- Try adding a second restriction from the restriction tab on the checkouts page, it should work ok there.


Also MANUAL does look a bit like an untranslatable string...
Comment 1 Liz Rea 2013-11-21 22:07:10 UTC
I think this has to do more with how existing (pre 3.14) debarments are shown alongside the new system for restrictions.

From what I can tell, the two systems are utterly independent, which can lead to displays like this: http://img593.imageshack.us/img593/2772/12la.png - where a borrower is simultaneously having no restrictions, and being restricted. That's a really confusing display.

Also, one cannot add multiple debarments from the edit page, as Katrin has shown. That is confusing. 

I have a few ideas of how to fix this - 

remove the debarring functionality from "edit borrower" and add it (if it has a purpose!) to the restrictions tab. Probably not best, could be confusing.

Display the edit-generated restriction in the table as a restriction, and leave its management aside (might be a good in-between step)

Migrate the old restrictions to the new system in a DB update, and eliminate them from the edit screen altogether.

Thoughts?
Comment 2 Katrin Fischer 2013-11-21 22:11:12 UTC
What we have to keep in mind here is importing debarred patrons - we actually have a library where that is wanted. Right now it's just a matter of having a date in debarred in your patron import file.
Comment 3 Liz Rea 2013-11-22 00:08:45 UTC
A bit more about this - further poking indicates that the cause for error on the Member Edit page is to do with the first existing debarment being updated with new information, rather than a new one being added. 

Being able to edit a debarment is a nice feature, but I think it's not actually intended here.
Comment 4 Katrin Fischer 2013-11-22 08:35:30 UTC
Upping severity - you can accidentally lose data here - and losing information about why a patron is debarred/restricted can be quite a problem.
Comment 5 Kyle M Hall 2013-11-22 13:33:37 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2013-11-26 15:48:59 UTC
I can add an additional restriction from the patron edit page, but it doesn't save the date that I specify.
Comment 7 Jonathan Druart 2013-12-24 13:02:20 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2013-12-24 13:03:20 UTC
(In reply to Owen Leonard from comment #6)
> I can add an additional restriction from the patron edit page, but it
> doesn't save the date that I specify.

The patch works for me, the dates are saved correctly.
Comment 9 Katrin Fischer 2013-12-26 10:40:18 UTC Comment hidden (obsolete)
Comment 10 Katrin Fischer 2013-12-26 10:40:52 UTC
Created attachment 23817 [details] [review]
[PASSED QA] Bug 11282 - Not possible to create multiple restrictions from patron details/new restriction overwrites existing

Test Plan:
1) Edit a patron, add a restriction
2) Edit the patron again, add a second restriction
3) Note the first restriction has disappeared!
4) Apply this patch
5) Edit the patron again, add another restriction
6) Note the previous restriction is not longer removed

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested:
- Adding and removing multiple restrictions from
  - the details tab
  - the checkouts tab
  - the edit patron form
All works as expected.
Patch passes all tests in t, xt, and QA script.
Comment 11 Galen Charlton 2013-12-26 15:46:22 UTC
Pushed to master.  Thanks, Kyle!
Comment 12 Fridolin Somers 2014-01-16 16:34:43 UTC
Patch pushed to 3.14.x, will be in 3.14.2.