[Bug 39498] New: Correct display of patron restriction comments
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Bug ID: 39498 Summary: Correct display of patron restriction comments Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: philip.orr@lmscloud.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com In Bug 31097, we introduced the possibility to show display of patron restriction types and expiry dates directly in the patron's account in checkouts and in details. (And to the display in the OPAC) The way it is currently, if a patron has many restrictions but only on one of them they have a comment on the restriction, the text "with the explanation:" is shown for each restriction, even those with no comments. This looks not right. The text should only be shown for the one restriction that has a comment and not for the others. This is because we are checking if "debarredcomment" exists. But "debarredcomment" is filled as soon as any one restriction has a comment. So it will be true even for other restrictions that have no comment as long as they are on the same patron account as one that has a comment. Instead we should be checking inside the FOREACH loop for every restriction, if it has restriction.comment filled, and only display the text if that is true for that specific restriction. Also, if you add a restriction with a comment containing the text "OVERDUES_PROCESS" (or more likely if such a restriction is set automatically during overdues process), all other restrictions are no longer displayed. This is because the overdues check again happens before the FOREACH loop. Again it should be inside the loop so it only displays for the Overdues restrictions and does not block other restrictions from also being shown. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |philip.orr@lmscloud.de |ity.org | Depends on| |31097 --- Comment #1 from Philip Orr <philip.orr@lmscloud.de> --- I will write a patch to correct this and add it here. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31097 [Bug 31097] Patron restriction types should display in staff interface and OPAC -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #2 from Philip Orr <philip.orr@lmscloud.de> --- Test plan: 1. Before applying the patch, check how the display is currently. First set syspref PatronRestrictionTypes to "Allow" 2. Add two different new restriction types, fill out both "Code" and "Label" 3. Go to a patron's checkout page and add one of each of these restrictions, but do not fill out the comment field when adding them! 4. Observe that in the checkouts page and details page of the patron, it just says "Restricted since..." and does not show the restriction types. 5. Add another restriction, this time fill out the comment field 6. Observe that now in checkout and detail pages, the labels from the restriction types are listed and the comment shown. 7. Apply patch 8. Go to patron's details and checkout pages and check the restrictions are now displayed correctly, that is the text "with the explanation" is only shown for the restrictions that actually have a comment 8b. Log in to the OPAC with that patron and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 9. Go to a different patron's account and add a restriction without a comment 10. Check it is now displayed correctly 11. Add more restrictions and check they are displayed correctly. Also add an OVERDUES restriction: a. find a patron with an overdue item checked out (or create an overdue checkout on a patron's account) b. go to Tools -> Overdue notice/status triggers c. set up a rule for that patron's category, e.g. "First" -> Delay: 1, make sure to mark the check box for "Restrict" and "Print" d. run misc/cronjobs/overdue_notices.pl e. that patron should now also have an OVERDUES restriction 12. Turn PatronRestrictionTypes off again and check the patrons if everything is still displayed correctly 13. Go to another different patron and add a restriction with no comment, check if it is displayed correctly 14. Add another restriction with a comment and check it is displayed correctly 15. Log in to the OPAC with the patron that had OVERDUES restriction and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 16. Same thing for the other patron without the OVERDUES restriction. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |String patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #3 from Philip Orr <philip.orr@lmscloud.de> --- Created attachment 180126 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180126&action=edit Bug 39498: correct patron restrictions displays Test plan: 1. Before applying the patch, check how the display is currently. First set syspref PatronRestrictionTypes to "Allow" 2. Add two different new restriction types, fill out both "Code" and "Label" 3. Go to a patron's checkout page and add one of each of these restrictions, but do not fill out the comment field when adding them! 4. Observe that in the checkouts page and details page of the patron, it just says "Restricted since..." and does not show the restriction types. 5. Add another restriction, this time fill out the comment field 6. Observe that now in checkout and detail pages, the labels from the restriction types are listed and the comment shown. 7. Apply patch 8. Go to patron's details and checkout pages and check the restrictions are now displayed correctly, that is the text "with the explanation" is only shown for the restrictions that actually have a comment 8b. Log in to the OPAC with that patron and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 9. Go to a different patron's account and add a restriction without a comment 10. Check it is now displayed correctly 11. Add more restrictions and check they are displayed correctly. Also add an OVERDUES restriction: a. find a patron with an overdue item checked out (or create an overdue checkout on a patron's account) b. go to Tools -> Overdue notice/status triggers c. set up a rule for that patron's category, e.g. "First" -> Delay: 1, make sure to mark the check box for "Restrict" and "Print" d. run misc/cronjobs/overdue_notices.pl e. that patron should now also have an OVERDUES restriction 12. Turn PatronRestrictionTypes off again and check the patrons if everything is still displayed correctly 13. Go to another different patron and add a restriction with no comment, check if it is displayed correctly 14. Add another restriction with a comment and check it is displayed correctly 15. Log in to the OPAC with the patron that had OVERDUES restriction and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 16. Same thing for the other patron without the OVERDUES restriction. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |claire.hernandez@biblibre.c | |om --- Comment #4 from claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> --- c. set up a rule for that patron's category, e.g. "First" -> Delay: 1, make sure to mark the check box for "Restrict" and "Print" You can add Letter = ODUE -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180126|0 |1 is obsolete| | --- Comment #5 from claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> --- Created attachment 180272 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180272&action=edit Bug 39498: correct patron restrictions displays Test plan: 1. Before applying the patch, check how the display is currently. First set syspref PatronRestrictionTypes to "Allow" 2. Add two different new restriction types, fill out both "Code" and "Label" 3. Go to a patron's checkout page and add one of each of these restrictions, but do not fill out the comment field when adding them! 4. Observe that in the checkouts page and details page of the patron, it just says "Restricted since..." and does not show the restriction types. 5. Add another restriction, this time fill out the comment field 6. Observe that now in checkout and detail pages, the labels from the restriction types are listed and the comment shown. 7. Apply patch 8. Go to patron's details and checkout pages and check the restrictions are now displayed correctly, that is the text "with the explanation" is only shown for the restrictions that actually have a comment 8b. Log in to the OPAC with that patron and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 9. Go to a different patron's account and add a restriction without a comment 10. Check it is now displayed correctly 11. Add more restrictions and check they are displayed correctly. Also add an OVERDUES restriction: a. find a patron with an overdue item checked out (or create an overdue checkout on a patron's account) b. go to Tools -> Overdue notice/status triggers c. set up a rule for that patron's category, e.g. "First" -> Delay: 1, make sure to mark the check box for "Restrict" and "Print" d. run misc/cronjobs/overdue_notices.pl e. that patron should now also have an OVERDUES restriction 12. Turn PatronRestrictionTypes off again and check the patrons if everything is still displayed correctly 13. Go to another different patron and add a restriction with no comment, check if it is displayed correctly 14. Add another restriction with a comment and check it is displayed correctly 15. Log in to the OPAC with the patron that had OVERDUES restriction and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 16. Same thing for the other patron without the OVERDUES restriction. Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180272|0 |1 is obsolete| | --- Comment #6 from Philip Orr <philip.orr@lmscloud.de> --- Created attachment 182301 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182301&action=edit Bug 39498: correct patron restrictions displays Test plan: 1. Before applying the patch, check how the display is currently. First set syspref PatronRestrictionTypes to "Allow" 2. Add two different new restriction types, fill out both "Code" and "Label" 3. Go to a patron's checkout page and add one of each of these restrictions, but do not fill out the comment field when adding them! 4. Observe that in the checkouts page and details page of the patron, it just says "Restricted since..." and does not show the restriction types. 5. Add another restriction, this time fill out the comment field 6. Observe that now in checkout and detail pages, the labels from the restriction types are listed and the comment shown. 7. Apply patch 8. Go to patron's details and checkout pages and check the restrictions are now displayed correctly, that is the text "with the explanation" is only shown for the restrictions that actually have a comment 8b. Log in to the OPAC with that patron and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 9. Go to a different patron's account and add a restriction without a comment 10. Check it is now displayed correctly 11. Add more restrictions and check they are displayed correctly. Also add an OVERDUES restriction: a. find a patron with an overdue item checked out (or create an overdue checkout on a patron's account) b. go to Tools -> Overdue notice/status triggers c. set up a rule for that patron's category, e.g. "First" -> Delay: 1, make sure to mark the check box for "Restrict" and "Print" d. run misc/cronjobs/overdue_notices.pl e. that patron should now also have an OVERDUES restriction 12. Turn PatronRestrictionTypes off again and check the patrons if everything is still displayed correctly 13. Go to another different patron and add a restriction with no comment, check if it is displayed correctly 14. Add another restriction with a comment and check it is displayed correctly 15. Log in to the OPAC with the patron that had OVERDUES restriction and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 16. Same thing for the other patron without the OVERDUES restriction. Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #7 from David Nind <david@davidnind.com> --- Hi Claire, it looks like you have signed off this bug (which is great, thanks!). To get the credit on the dashboard, please change the status to Signed Off. David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #8 from Philip Orr <philip.orr@lmscloud.de> --- Claire had set it to signed off, I set the status back to "Needs Signoff" by accident after I rebased this one - sorry about that - setting back to "Signed Off" :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #9 from Philip Orr <philip.orr@lmscloud.de> --- Oh and I guess I should mention, it's rebased now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #10 from David Nind <david@davidnind.com> --- Excellent!. Thanks Philip. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 182425 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182425&action=edit Screenshots I'm not sure I like this change to be honest.. I find it less clear.. I'd be interested in others opinions.. I'd be tempted to just drop the 'with explanation' text from the top and display the original list as a list as before.. I likes that the dates/indefinite lined up the the beginning, followed by restriction type, followed by the optional comment. Your change, to me, makes it harder to parse at a glance to me... seeking others opinions here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182301|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 182426 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182426&action=edit Bug 39498: correct patron restrictions displays Test plan: 1. Before applying the patch, check how the display is currently. First set syspref PatronRestrictionTypes to "Allow" 2. Add two different new restriction types, fill out both "Code" and "Label" 3. Go to a patron's checkout page and add one of each of these restrictions, but do not fill out the comment field when adding them! 4. Observe that in the checkouts page and details page of the patron, it just says "Restricted since..." and does not show the restriction types. 5. Add another restriction, this time fill out the comment field 6. Observe that now in checkout and detail pages, the labels from the restriction types are listed and the comment shown. 7. Apply patch 8. Go to patron's details and checkout pages and check the restrictions are now displayed correctly, that is the text "with the explanation" is only shown for the restrictions that actually have a comment 8b. Log in to the OPAC with that patron and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 9. Go to a different patron's account and add a restriction without a comment 10. Check it is now displayed correctly 11. Add more restrictions and check they are displayed correctly. Also add an OVERDUES restriction: a. find a patron with an overdue item checked out (or create an overdue checkout on a patron's account) b. go to Tools -> Overdue notice/status triggers c. set up a rule for that patron's category, e.g. "First" -> Delay: 1, make sure to mark the check box for "Restrict" and "Print" d. run misc/cronjobs/overdue_notices.pl e. that patron should now also have an OVERDUES restriction 12. Turn PatronRestrictionTypes off again and check the patrons if everything is still displayed correctly 13. Go to another different patron and add a restriction with no comment, check if it is displayed correctly 14. Add another restriction with a comment and check it is displayed correctly 15. Log in to the OPAC with the patron that had OVERDUES restriction and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 16. Same thing for the other patron without the OVERDUES restriction. Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- To get this in a state ready for QA I had to rework it very slightly as we had invalid HTML getting generated and thus the tidy scripts weren't applying. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aude.charillon@openfifth.co | |.uk, oleonard@myacpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I have to admit that the first version seems easier to scan at a busy circulation desk. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #15 from Philip Orr <philip.orr@lmscloud.de> --- I'll see if I can find time next week to try and rework the display. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #16 from Philip Orr <philip.orr@lmscloud.de> --- .. and thanks Martin for the QA rework! :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #17 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 182437 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182437&action=edit Another proposal I've been tinkering with this too, trying to make it clearer. I notice it displays expired restrictions. Has it always been that way? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #18 from Aude Charillon <aude.charillon@openfifth.co.uk> --- Still haven't had a proper look but quick reply here... (In reply to Owen Leonard from comment #17)
I notice it displays expired restrictions. Has it always been that way?
I believe so. The Manual says: "Expired restrictions are marked as such as of Koha version 23.11. In prior versions, if a restriction was expired, it looked the same as an active restriction, but it stopped blocking circulation nonetheless." https://koha-community.org/manual/latest/en/html/patrons.html#restrictions Some libraries use cleanup_database.pl to delete old expired restrictions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #19 from Philip Orr <philip.orr@lmscloud.de> --- Thanks Owen, that looks great to me - reads easier to me at a glance than the way it was before! And definitely better than my own attempt. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|String patch |Small patch Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182426|0 |1 is obsolete| | --- Comment #20 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 182491 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182491&action=edit Bug 39498: correct patron restrictions displays This patch updates the way patron restrictions are displayed in the OPAC and staff interface, with the intention of making the details of each restriction more clear. In the OPAC, a new include file is created to be reused on the holds page and the user summary page. opac-user.pl is updated to allow a parameter to be passed to automatically open the "Overdues" tab. Test plan (copied from the original patch): 1. Before applying the patch, check how the display is currently. First set syspref PatronRestrictionTypes to "Allow" 2. Add two different new restriction types, fill out both "Code" and "Label" 3. Go to a patron's checkout page and add one of each of these restrictions, but do not fill out the comment field when adding them! 4. Observe that in the checkouts page and details page of the patron, it just says "Restricted since..." and does not show the restriction types. 5. Add another restriction, this time fill out the comment field 6. Observe that now in checkout and detail pages, the labels from the restriction types are listed and the comment shown. 7. Apply patch 8. Go to patron's details and checkout pages and check the restrictions are now displayed correctly, that is the text "with the explanation" is only shown for the restrictions that actually have a comment 8b. Log in to the OPAC with that patron and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 9. Go to a different patron's account and add a restriction without a comment 10. Check it is now displayed correctly 11. Add more restrictions and check they are displayed correctly. Also add an OVERDUES restriction: 11a. Find a patron with an overdue item checked out (or create an overdue checkout on a patron's account) 11b. Go to Tools -> Overdue notice/status triggers 11c. Set up a rule for that patron's category, e.g. "First" -> Delay: 1, make sure to mark the check box for "Restrict" and "Print" 11d. Run misc/cronjobs/overdue_notices.pl 11e. That patron should now also have an OVERDUES restriction 12. Turn PatronRestrictionTypes off again and check the patrons if everything is still displayed correctly 13. Go to another different patron and add a restriction with no comment, check if it is displayed correctly 14. Add another restriction with a comment and check it is displayed correctly 15. Log in to the OPAC with the patron that had OVERDUES restriction and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 16. Same thing for the other patron without the OVERDUES restriction. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #21 from David Nind <david@davidnind.com> --- Created attachment 182609 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182609&action=edit Bug 39498: Correct patron restrictions displays This patch updates the way patron restrictions are displayed in the OPAC and staff interface, with the intention of making the details of each restriction more clear. In the OPAC, a new include file is created to be reused on the holds page and the user summary page. opac-user.pl is updated to allow a parameter to be passed to automatically open the "Overdues" tab. Test plan: 1. Before applying the patch, check how the display is currently. First set syspref PatronRestrictionTypes to "Allow" 2. Add two different new restriction types, fill out both "Code" and "Label" 3. Go to a patron's checkout page and add one of each of these restrictions, but do not fill out the comment field when adding them! 4. Observe that in the checkouts page and details page of the patron, it just says "Restricted since..." and does not show the restriction types. 5. Add another restriction, this time fill out the comment field 6. Observe that now in checkout and detail pages, the labels from the restriction types are listed and the comment shown. 7. Apply patch 8. Go to patron's details and checkout pages and check the restrictions are now displayed correctly, that is the text "with the explanation" is only shown for the restrictions that actually have a comment 8b. Log in to the OPAC with that patron and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 9. Go to a different patron's account and add a restriction without a comment 10. Check it is now displayed correctly 11. Add more restrictions and check they are displayed correctly. Also add an OVERDUES restriction: 11a. Find a patron with an overdue item checked out (or create an overdue checkout on a patron's account) 11b. Go to Tools -> Overdue notice/status triggers 11c. Set up a rule for that patron's category, e.g. "First" -> Delay: 1, make sure to mark the check box for "Restrict" and "Print" 11d. Run misc/cronjobs/overdue_notices.pl 11e. That patron should now also have an OVERDUES restriction 12. Turn PatronRestrictionTypes off again and check the patrons if everything is still displayed correctly 13. Go to another different patron and add a restriction with no comment, check if it is displayed correctly 14. Add another restriction with a comment and check it is displayed correctly 15. Log in to the OPAC with the patron that had OVERDUES restriction and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 16. Same thing for the other patron without the OVERDUES restriction. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182491|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #22 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Wow, Owens looks great and I love that it puts it up front and centre how to resolve the restrictions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182609|0 |1 is obsolete| | --- Comment #23 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 183539 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183539&action=edit Bug 39498: Correct patron restrictions displays This patch updates the way patron restrictions are displayed in the OPAC and staff interface, with the intention of making the details of each restriction more clear. In the OPAC, a new include file is created to be reused on the holds page and the user summary page. opac-user.pl is updated to allow a parameter to be passed to automatically open the "Overdues" tab. Test plan: 1. Before applying the patch, check how the display is currently. First set syspref PatronRestrictionTypes to "Allow" 2. Add two different new restriction types, fill out both "Code" and "Label" 3. Go to a patron's checkout page and add one of each of these restrictions, but do not fill out the comment field when adding them! 4. Observe that in the checkouts page and details page of the patron, it just says "Restricted since..." and does not show the restriction types. 5. Add another restriction, this time fill out the comment field 6. Observe that now in checkout and detail pages, the labels from the restriction types are listed and the comment shown. 7. Apply patch 8. Go to patron's details and checkout pages and check the restrictions are now displayed correctly, that is the text "with the explanation" is only shown for the restrictions that actually have a comment 8b. Log in to the OPAC with that patron and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 9. Go to a different patron's account and add a restriction without a comment 10. Check it is now displayed correctly 11. Add more restrictions and check they are displayed correctly. Also add an OVERDUES restriction: 11a. Find a patron with an overdue item checked out (or create an overdue checkout on a patron's account) 11b. Go to Tools -> Overdue notice/status triggers 11c. Set up a rule for that patron's category, e.g. "First" -> Delay: 1, make sure to mark the check box for "Restrict" and "Print" 11d. Run misc/cronjobs/overdue_notices.pl 11e. That patron should now also have an OVERDUES restriction 12. Turn PatronRestrictionTypes off again and check the patrons if everything is still displayed correctly 13. Go to another different patron and add a restriction with no comment, check if it is displayed correctly 14. Add another restriction with a comment and check it is displayed correctly 15. Log in to the OPAC with the patron that had OVERDUES restriction and check they are displayed correctly in their summary page and when the patron is trying to place a hold. 16. Same thing for the other patron without the OVERDUES restriction. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #24 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.11.00 |25.11.00,25.05.02 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 --- Comment #25 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #26 from Fridolin Somers <fridolin.somers@biblibre.com> --- I prefer not impact 24.11.x for stability -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This patch updates the way release notes| |patron restrictions are | |displayed in the OPAC and | |staff interface, with the | |intention of making the | |details of each restriction | |more clear. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39498 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This patch updates the way |This updates the way patron release notes|patron restrictions are |restrictions are displayed |displayed in the OPAC and |in the OPAC and staff |staff interface, with the |interface, with the |intention of making the |intention of making the |details of each restriction |details of each restriction |more clear. |clearer. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org