HoldsCount must be replaced with biblio.holds.count
Created attachment 160898 [details] [review] Bug 35782: Replace TT plugin's method Biblio::HoldsCount We can use biblio.holds.count instead. The main idea here is to make sure we are passing a Koha::Biblio object as 'biblio' to all the templates including biblio-view-menu.inc Test plan: 1. Go to the biblio detail view, click on the different entries in the menu on the left. Confirm that the "Holds" tab always has the correct number of Holds display in the parenthesis. 2. Run a search and confirm that the number of holds are still displayed for each result. QA: git grep biblio-view-menu.inc notice the tt list, open the corresponding perl controllers and confirm that 'biblio' is passed and that it is a Koha::Biblio object. The only missing place I found was in viewlog. Note that we are not removing the TT method yet, we are marking it as deprecated and also display a warning during the update DB process in case one of the notice templates is using it.
Created attachment 160930 [details] Screenshot - Placing hold - No value in brackets When I go to place a hold in the staff interface, the display for the Holds tab has an empty bracket. See the screenshot. After the hold is made, it displays correctly. The search results is fine, and displays the correct number of holds.
Created attachment 160969 [details] [review] Bug 35782: Fix scoping problem with "biblio" The "biblio" Koha::Biblio object we send from the controller needs to be accessible from the include files. To avoid a clash we rename it biblio_info
Good catch, David, Thanks! Should be fixed now.
Created attachment 160987 [details] [review] Bug 35782: Replace TT plugin's method Biblio::HoldsCount We can use biblio.holds.count instead. The main idea here is to make sure we are passing a Koha::Biblio object as 'biblio' to all the templates including biblio-view-menu.inc Test plan: 1. Go to the biblio detail view, click on the different entries in the menu on the left. Confirm that the "Holds" tab always has the correct number of Holds display in the parenthesis. 2. Run a search and confirm that the number of holds are still displayed for each result. QA: git grep biblio-view-menu.inc notice the tt list, open the corresponding perl controllers and confirm that 'biblio' is passed and that it is a Koha::Biblio object. The only missing place I found was in viewlog. Note that we are not removing the TT method yet, we are marking it as deprecated and also display a warning during the update DB process in case one of the notice templates is using it. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 160988 [details] [review] Bug 35782: Fix scoping problem with "biblio" The "biblio" Koha::Biblio object we send from the controller needs to be accessible from the include files. To avoid a clash we rename it biblio_info Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. Apply the patch, run updatedatabase, restart_all 2. Go to a record with items in the staff interface. 3. Place several holds - the number of holds shown in brackets on the Holds tab label should display and be correct. 4. Do a search that returns the record(s) with the holds - the Holds (X) should be displayed correctly in the search results.
Created attachment 161036 [details] [review] Bug 35782: Replace TT plugin's method Biblio::HoldsCount We can use biblio.holds.count instead. The main idea here is to make sure we are passing a Koha::Biblio object as 'biblio' to all the templates including biblio-view-menu.inc Test plan: 1. Go to the biblio detail view, click on the different entries in the menu on the left. Confirm that the "Holds" tab always has the correct number of Holds display in the parenthesis. 2. Run a search and confirm that the number of holds are still displayed for each result. QA: git grep biblio-view-menu.inc notice the tt list, open the corresponding perl controllers and confirm that 'biblio' is passed and that it is a Koha::Biblio object. The only missing place I found was in viewlog. Note that we are not removing the TT method yet, we are marking it as deprecated and also display a warning during the update DB process in case one of the notice templates is using it. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 161037 [details] [review] Bug 35782: Fix scoping problem with "biblio" The "biblio" Koha::Biblio object we send from the controller needs to be accessible from the include files. To avoid a clash we rename it biblio_info Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Can I please get a rebase? Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 35782: Replace TT plugin's method Biblio::HoldsCount Applying: Bug 35782: Fix scoping problem with "biblio" error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt). error: could not build fake ancestor Patch failed at 0001 Bug 35782: Fix scoping problem with "biblio" hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-35782-Fix-scoping-problem-with-biblio-wq6ym53n.patch
Pushed a branch: https://github.com/PTFS-Europe/koha/tree/bug_35782
Fixed this inline: + bug_number => "BUG_35872"
Pushed for 24.05! Well done everyone, thank you!
Enhancement not pushed to 23.11.x
Architecture change, nothing to add/edit in the Koha manual.