There is an error in the log viewer when displaying the recalls logs on the screen (exporting to a file works though): Template process failed: undef error - The method Koha::Recall->biblionumber is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Object.pm line 875 Koha::Object::AUTOLOAD('Koha::Recall=HASH(0x55da45a77358)') called at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt line 385 eval {...} at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt line 385 eval {...} at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt line 409 eval {...} at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt line 18 Template::Provider::__ANON__('Template::Context=HASH(0x55da45d16528)') called at /usr/lib/x86_64-linux-gnu/perl5/5.32/Template/Document.pm line 163 eval {...} at /usr/lib/x86_64-linux-gnu/perl5/5.32/Template/Document.pm line 161 Templ ..... To replicate: 1. Enable recalls: set UseRecalls system preference to 'Use'. 2. Ensure the RecallsLog system preference is set to 'Log'. 3. Setup recalls circulation and fines rules: . Recalls allowed (total) = 5 . Recalls per record (count) = 2 . On shelf recalls allowed = 'If any unavailable' . Recall due date interval (day) = 3 . Recall overdue fine amount = 5 . Recall pickup period (day) = 2 4. Checkout an item to a patron: - Patron used: Mary Burton (Midway) - Record used: Programming Perl (biblionumber = 262, one item = 39999000011418, home library = Centerville) 5. Change username/password for a patron and login to the OPAC and place a recall for the item in step 4. - Patron used: Henry Acevedo (Midway) 6. View the checkout and details tab for patron used in step 4: . List of checkouts should display correctly . Message in the title column for the item with a recall: This item has been recalled and the due date updated. 7. Go to Tools > Log viewer and press submit (can limit the module to just Recalls if you wish).
Created attachment 136118 [details] [review] Bug 30971: Recalls log viewer error This patch addresses the itemnumber and biblionumber attributes for recalls having been renamed. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 136119 [details] [review] Bug 30971: (follow-up) Fix one more occurence To test: 1. Run: $ git grep 'recall.itemnumber' => SUCCESS: No more occurences 2. Run: $ git grep 'recall.biblionumber' => SUCCESS: No more occurences 3. Run: $ git grep 'recall\->biblionumber' => SUCCESS: No more occurences 4. Run: $ git grep 'recall\->itemnumber' => FAIL: One standing occurence 5. Apply this patch 6. Repeat 4 => SUCCESS: No more occurences 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 136120 [details] [review] Bug 30971: (follow-up) Fix recall.branchcode occurences This fixes a couple cases actually. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 136121 [details] [review] Bug 30971: Recalls log viewer error This patch addresses the itemnumber and biblionumber attributes for recalls having been renamed. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 136122 [details] [review] Bug 30971: (follow-up) Fix one more occurence To test: 1. Run: $ git grep 'recall.itemnumber' => SUCCESS: No more occurences 2. Run: $ git grep 'recall.biblionumber' => SUCCESS: No more occurences 3. Run: $ git grep 'recall\->biblionumber' => SUCCESS: No more occurences 4. Run: $ git grep 'recall\->itemnumber' => FAIL: One standing occurence 5. Apply this patch 6. Repeat 4 => SUCCESS: No more occurences 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Thanks Tomás! There are no more occurrences of the git grep queries after the patches are applied, and the log viewer now works for recalls. David
(In reply to David Nind from comment #6) > Thanks Tomás! > > There are no more occurrences of the git grep queries after the patches are > applied, and the log viewer now works for recalls. > > David David, thanks to you. I also did this: Generated a 'recalls' file: $ cat recalls borrowernumber recalldate biblionumber branchcode cancellationdate recallnotes itemnumber waitingdate expirationdate old item_level_recall and then: $ for i in $(cat ~/recalls) ; do \ git grep "recall\.$i" | grep -v translator; \ git grep "recall\->$i" | grep -v translator; \ done And no more results. Chances are that in some places variables could've been named differently. Hopefully QA didn't allow that :-D
(In reply to David Nind from comment #6) > Thanks Tomás! > > There are no more occurrences of the git grep queries after the patches are > applied, and the log viewer now works for recalls. > > David You missed one of the patches to SO
Created attachment 136123 [details] [review] Bug 30971: (follow-up) Fix recall.branchcode occurences This fixes a couple cases actually. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> https://bugs.koha-community.org/show_bug.cgi?id=30917
(In reply to Tomás Cohen Arazi from comment #8) > You missed one of the patches to SO I was too quick! Now signed off as well.
Created attachment 136139 [details] [review] Bug 30971: Recalls log viewer error This patch addresses the itemnumber and biblionumber attributes for recalls having been renamed. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 136140 [details] [review] Bug 30971: (follow-up) Fix one more occurence To test: 1. Run: $ git grep 'recall.itemnumber' => SUCCESS: No more occurences 2. Run: $ git grep 'recall.biblionumber' => SUCCESS: No more occurences 3. Run: $ git grep 'recall\->biblionumber' => SUCCESS: No more occurences 4. Run: $ git grep 'recall\->itemnumber' => FAIL: One standing occurence 5. Apply this patch 6. Repeat 4 => SUCCESS: No more occurences 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 136141 [details] [review] Bug 30971: (follow-up) Fix recall.branchcode occurences This fixes a couple cases actually. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
All works as expected now, thanks for following through on all this Tomas. PQA
Pushed to master for 22.11. Nice work everyone, thanks!
backported to 22.05.x for 22.05.01