Bug 18552 - Borrower debarments do not show on member detail page
Summary: Borrower debarments do not show on member detail page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Aleisha Amohia
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 18647
  Show dependency treegraph
 
Reported: 2017-05-05 17:56 UTC by Barton Chittenden
Modified: 2018-12-03 20:04 UTC (History)
8 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18552: Borrower debarments not showing on member detail page (1.88 KB, patch)
2017-05-18 23:13 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 18552: Borrower debarments not showing on member detail page (2.05 KB, patch)
2017-05-19 05:14 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18552: Borrower debarments not showing on member detail page (2.15 KB, patch)
2017-05-19 10:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18552: [QA Follow-up] Resolve warnings (2.53 KB, patch)
2017-05-19 10:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18552: [16.11.X] Borrower debarments not showing on member detail page (2.65 KB, patch)
2017-05-22 07:54 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18552: [16.11.X] [QA Follow-up] Resolve warnings (2.23 KB, patch)
2017-05-22 07:54 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Barton Chittenden 2017-05-05 17:56:49 UTC
To re-create:

1) Scan a borrower's cardnumber into the 'Check out' text area on the main page.
2) Click on the restrictions tab and set a manual restriction.
3) This will show 
    Restricted: Patron's account is restricted until xxx 
    with the explanation: yyyy
4) Click on the 'details' tab on the left. The restriction message shows at the
   top of the page, but
5) Click on the restrictions tab on the bottom of the page, 
   the text under that tab shows:

     Patron is currently unrestricted.
      Add manual restriction

I have replicated this issue in 16.11 and master.
Comment 1 Aleisha Amohia 2017-05-18 23:13:17 UTC
Created attachment 63551 [details] [review]
Bug 18552: Borrower debarments not showing on member detail page

To test:
1) Go to a borrowers details page and create a manual restriction
2) Notice the restriction shows at the top of the page but the
restriction tab says the member is currently unrestricted
3) Apply patch and refresh page
4) Restrictions tab should now correctly show debarments and correct
number is shown
5) Confirming deleting and adding restrictions still works as expected

Sponsored-by: Catalyst IT
Comment 2 Marc Véron 2017-05-19 05:14:13 UTC
Created attachment 63557 [details] [review]
Bug 18552: Borrower debarments not showing on member detail page

To test:
1) Go to a borrowers details page and create a manual restriction
2) Notice the restriction shows at the top of the page but the
restriction tab says the member is currently unrestricted
3) Apply patch and refresh page
4) Restrictions tab should now correctly show debarments and correct
number is shown
5) Confirming deleting and adding restrictions still works as expected

Sponsored-by: Catalyst IT

Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 3 Marcel de Rooy 2017-05-19 10:28:41 UTC
Created attachment 63576 [details] [review]
Bug 18552: Borrower debarments not showing on member detail page

To test:
1) Go to a borrowers details page and create a manual restriction
2) Notice the restriction shows at the top of the page but the
restriction tab says the member is currently unrestricted
3) Apply patch and refresh page
4) Restrictions tab should now correctly show debarments and correct
number is shown
5) Confirming deleting and adding restrictions still works as expected

Sponsored-by: Catalyst IT

Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2017-05-19 10:28:45 UTC
Created attachment 63577 [details] [review]
Bug 18552: [QA Follow-up] Resolve warnings

Like:
Problem = a value of AutoResumeSuspendedHolds has been passed to param without key at /usr/share/koha/masterclone/C4/Templates.pm line 137.
Problem = a value of relatives_borrowernumbers has been passed to param without key at /usr/share/koha/masterclone/C4/Templates.pm line 137.

Problem is functions returning undef in list context (in this case
housebound_role).
No need to call Patrons::find a second time.

Note: The call of GetDebarments in the first patch suffered from this too.
It is in a fine place now too. But strictly speaking, should not have been
moved.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Kyle M Hall 2017-05-19 14:36:05 UTC
Pushed to master for 17.05, thanks Marcel!
Comment 6 Katrin Fischer 2017-05-21 21:23:00 UTC
Patch doesn't apply cleanly to 16.11.x - please rebase!
Comment 7 Marcel de Rooy 2017-05-22 07:26:13 UTC
(In reply to Kyle M Hall from comment #5)
> Pushed to master for 17.05, thanks Marcel!

Don't forget Aleisha :)
Comment 8 Marcel de Rooy 2017-05-22 07:54:49 UTC
Created attachment 63597 [details] [review]
Bug 18552: [16.11.X] Borrower debarments not showing on member detail page

To test:
1) Go to a borrowers details page and create a manual restriction
2) Notice the restriction shows at the top of the page but the
restriction tab says the member is currently unrestricted
3) Apply patch and refresh page
4) Restrictions tab should now correctly show debarments and correct
number is shown
5) Confirming deleting and adding restrictions still works as expected

Sponsored-by: Catalyst IT

Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2017-05-22 07:54:53 UTC
Created attachment 63598 [details] [review]
Bug 18552: [16.11.X] [QA Follow-up] Resolve warnings

Like:
Problem = a value of AutoResumeSuspendedHolds has been passed to param without key at /usr/share/koha/masterclone/C4/Templates.pm line 137.
Problem = a value of relatives_borrowernumbers has been passed to param without key at /usr/share/koha/masterclone/C4/Templates.pm line 137.

Problem is functions returning undef in list context (in this case
housebound_role).
No need to call Patrons::find a second time.

Note: The call of GetDebarments in the first patch suffered from this too.
It is in a fine place now too. But strictly speaking, should not have been
moved.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Marcel de Rooy 2017-05-23 12:34:21 UTC
We resolved one bug here to reveal another one. See bug 18647.
Comment 11 Katrin Fischer 2017-06-05 12:08:37 UTC
Hi Marcel,
I have a problem using the patches here. When I access a patron account in staff I see "Internal server error". The plack error log shows:
Template process failed: undef error - The method category_type is not covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121.
Comment 12 Katrin Fischer 2017-06-05 12:14:11 UTC
All good - works with the follow-up on bug 18647.

These patches have been pushed to 16.11.x and will be in 16.11.09.