Summary: | 'New patron' dropdown empty list on circulation.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi <tomascohen> |
Component: | Templates | Assignee: | Tomás Cohen Arazi <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | chris, jonathan.druart, veron |
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 7380 | ||
Bug Blocks: | |||
Attachments: |
(wrong) Dropdown empty
(correct) Dropdown with categories Bug 14508: 'New patron' dropdown empty list on circulation.pl [Signed-off] Bug 14508: 'New patron' dropdown empty list on circulation.pl Bug 14508: 'New patron' dropdown empty list on circulation.pl |
Description
Tomás Cohen Arazi
2015-07-08 20:10:48 UTC
Created attachment 40847 [details]
(wrong) Dropdown empty
Created attachment 40848 [details]
(correct) Dropdown with categories
Steps to reproduce: - On master (and 3.20 at least) - On the checkout form, perform a search that (a) returns more than one result (b) returns zero results - Click the dropdown menu to create a new patron => FAIL: Dropdown is empty - Repeat for (a) or (b) Created attachment 40850 [details] [review] Bug 14508: 'New patron' dropdown empty list on circulation.pl This patch makes includes/patron-toolbar.inc (the one in charge of rendering the 'New patron' dropdown) make use of the Categories Template Toolkit plugin to create the list of categories. (1) To check the setup is sane: - Go to the Patrons page => SUCCESS: The 'New patron' dropdown is populated - Click on the [+] symbol on the Patron search on the top => SUCCESS: The Categories dropdown is populated (2) To test the patch: - On the checkout form, perform a patron search that (a) returns more than one result (b) returns zero results - Click the dropdown menu to create a new patron => FAIL: Dropdown is empty - Repeat for (a) or (b) - Apply the patch and reload => SUCCESS: The dropdown is correctly populated - Repeat (1) => SUCCESS: Nothing got broken - Verify the logs => SUCCESS: No new warnings - Sign off :-D - Get a cookie - Smile Regards Discussion: we might need a new bug to start cleaning stuff like this: @categories=C4::Category->all; if(scalar(@categories) < 1){ $no_add = 1; $template->param(no_categories => 1); } else { $template->param(categories=>\@categories); } but it belongs to a new bug me thinks. Well, suggestions are welcome, but this must be fixed on stable ASAP so hurry :-D Created attachment 40887 [details] [review] [Signed-off] Bug 14508: 'New patron' dropdown empty list on circulation.pl This patch makes includes/patron-toolbar.inc (the one in charge of rendering the 'New patron' dropdown) make use of the Categories Template Toolkit plugin to create the list of categories. (1) To check the setup is sane: - Go to the Patrons page => SUCCESS: The 'New patron' dropdown is populated - Click on the [+] symbol on the Patron search on the top => SUCCESS: The Categories dropdown is populated (2) To test the patch: - On the checkout form, perform a patron search that (a) returns more than one result (b) returns zero results - Click the dropdown menu to create a new patron => FAIL: Dropdown is empty - Repeat for (a) or (b) - Apply the patch and reload => SUCCESS: The dropdown is correctly populated - Repeat (1) => SUCCESS: Nothing got broken - Verify the logs => SUCCESS: No new warnings - Sign off :-D - Get a cookie - Smile Regards Discussion: we might need a new bug to start cleaning stuff like this: @categories=C4::Category->all; if(scalar(@categories) < 1){ $no_add = 1; $template->param(no_categories => 1); } else { $template->param(categories=>\@categories); } but it belongs to a new bug me thinks. Well, suggestions are welcome, but this must be fixed on stable ASAP so hurry :-D Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 40891 [details] [review] Bug 14508: 'New patron' dropdown empty list on circulation.pl This patch makes includes/patron-toolbar.inc (the one in charge of rendering the 'New patron' dropdown) make use of the Categories Template Toolkit plugin to create the list of categories. (1) To check the setup is sane: - Go to the Patrons page => SUCCESS: The 'New patron' dropdown is populated - Click on the [+] symbol on the Patron search on the top => SUCCESS: The Categories dropdown is populated (2) To test the patch: - On the checkout form, perform a patron search that (a) returns more than one result (b) returns zero results - Click the dropdown menu to create a new patron => FAIL: Dropdown is empty - Repeat for (a) or (b) - Apply the patch and reload => SUCCESS: The dropdown is correctly populated - Repeat (1) => SUCCESS: Nothing got broken - Verify the logs => SUCCESS: No new warnings - Sign off :-D - Get a cookie - Smile Regards Discussion: we might need a new bug to start cleaning stuff like this: @categories=C4::Category->all; if(scalar(@categories) < 1){ $no_add = 1; $template->param(no_categories => 1); } else { $template->param(categories=>\@categories); } but it belongs to a new bug me thinks. Well, suggestions are welcome, but this must be fixed on stable ASAP so hurry :-D Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Patch pushed to master. Thanks for QAing this fast! Pushed to 3.20.x will be in 3.20.2 |