[Bug 30802] New: numReturnedItemsToShow doesn't show more than 20 items on the return screen
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 Bug ID: 30802 Summary: numReturnedItemsToShow doesn't show more than 20 items on the return screen Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com The system preference numReturnedItemsToShow says "show the XX last returned items on the checkin screen". The default value is 20. If you put a value < 20, it affects the returns.pl table. But if you put a value > 20 in the syspref, the table on returns.pl shows a maximum of 21 items. To test: 1- Make lots of checkouts, at least like 40 (I used the batchCheckouts feature) 2- Go to Circulation > Check in 3- Return 21 items The last 20 items returned will be displayed 4- Change numReturnedItemsToShow to 50 5- Return a couple more items Only the last 21 returned items are displayed 6- Change numReturnedItemsToShow to 10 7- Return a couple more items Only the last 10 returned items are displayed -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Indeed, there is a 20 hardcoded somewhere else... A possible fix could be diff --git a/circ/returns.pl b/circ/returns.pl index e2d2317a37a..ee874864d05 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -94,6 +94,7 @@ my $userenv_branch = $userenv->{'branch'} // ''; my $forgivemanualholdsexpire = $query->param('forgivemanualholdsexpire'); my $overduecharges = (C4::Context->preference('finesMode') && C4::Context->preference('finesMode') eq 'production'); +my $numReturnedItemsToShow = ( C4::Context->preference('numReturnedItemsToShow') ) ? C4::Context->preference('numReturnedItemsToShow') : 8; # Set up the item stack .... my %returneditems; @@ -104,7 +105,7 @@ foreach ( $query->param ) { my $counter; if (/ri-(\d*)/) { $counter = $1; - if ($counter > 20) { + if ($counter > $numReturnedItemsToShow) { next; } } @@ -645,14 +646,13 @@ foreach my $code ( keys %$messages ) { $template->param( errmsgloop => \@errmsgloop ); #set up so only the last 8 returned items display (make for faster loading pages) -my $returned_counter = ( C4::Context->preference('numReturnedItemsToShow') ) ? C4::Context->preference('numReturnedItemsToShow') : 8; my $count = 0; my @riloop; my $shelflocations = { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' } ) }; foreach ( sort { $a <=> $b } keys %returneditems ) { my %ri; - if ( $count++ < $returned_counter ) { + if ( $count++ < $numReturnedItemsToShow ) { my $bar_code = $returneditems{$_}; if ($riduedate{$_}) { my $duedate = dt_from_string( $riduedate{$_}, 'sql'); -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 --- Comment #2 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- I tested in a sandbox in case it was my installation that was acting up, and the sandbox is limited to 14, completely ignoring the value in numReturnedItemsToShow (which was set to 20 by default). Even after I changed the pref to 50, the returns.pl page only shows 14. -- 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=30802 --- Comment #3 from Shi Yao Wang <shi-yao.wang@inLibro.com> --- Created attachment 135206 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135206&action=edit Bug 30802: Make numReturnedItemsToShow function properly Replaced the hardcoded 20 by the value of numReturnedItemsToShow to display the right number of items in check in. Test plan: 1- Make lots of checkouts, at least like 40 (I used the batchCheckouts feature) 2- Go to Circulation > Check in 3- Return 21 items The last 20 items returned will be displayed 4- Change numReturnedItemsToShow to 50 5- Return a couple more items Only the last 20 returned items are displayed 6- Change numReturnedItemsToShow to 10 7- Return a couple more items Only the last 10 returned items are displayed 8- Apply the patch 9- Change numReturnedItemsToShow back to 20 10- Do steps 1 to 7 again, but this time step 5 returns the right amount of items -- 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=30802 Shi Yao Wang <shi-yao.wang@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |shi-yao.wang@inLibro.com |ity.org | CC| |caroline.cyr-la-rose@inlibr | |o.com, | |philippe.blouin@inlibro.com | |, shi-yao.wang@inLibro.com Status|NEW |Needs Signoff -- 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=30802 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- With numReturnedItemsToShow set to 50 I seem to be limited to seeing 36 checkins. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 Shi Yao Wang <shi-yao.wang@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #5 from Shi Yao Wang <shi-yao.wang@inLibro.com> --- (In reply to Owen Leonard from comment #4)
With numReturnedItemsToShow set to 50 I seem to be limited to seeing 36 checkins.
I tested again and set numReturnedItemsToShow to 50 and checked in 51 items and it shows 50 checkins for me. Can someone else confirm the behaviour? Putting this back to Needs Signoff for others to test. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk Status|Needs Signoff |Failed QA --- Comment #6 from Sally <sally.healey@cheshiresharedservices.gov.uk> --- (In reply to Caroline Cyr La Rose from comment #2)
I tested in a sandbox in case it was my installation that was acting up, and the sandbox is limited to 14, completely ignoring the value in numReturnedItemsToShow (which was set to 20 by default). Even after I changed the pref to 50, the returns.pl page only shows 14.
I found the same whilst testing on a sandbox. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 --- Comment #7 from Shi Yao Wang <shi-yao.wang@inLibro.com> --- I do not see this problem on my local koha installation. For those who tested on a sandbox, does it display a random number of returned items before the patch? For example: only displays 14 items of the 25 items returned when the default limit is 20. If so, then it is not caused by this patch and is probably an issue within the sandboxes' setup. (Which I think is really weird because there is no reason why it should be limited to 14 or 36 displayed checkins unless specified in syspref config or hardcoded like the 20 mentioned in Comment 1. Also, 14 + 36 = 50. Coincidence?) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm this is a bit of an odd one: What I did: * Created items with barcodes 1-30 using the multi-add feature * Checked all of them out to one patron using the batch checkout * Set numReturnedItemsToShow to 23 * First item vanished when I checked in number 20? * Not ok... ... trying with the patch next. And it works! The change also looks logical to me. Signing off. I wonder if returns of items not checked out or similar could throw the counter in testing? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=30802 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135206|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 140392 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140392&action=edit Bug 30802: Make numReturnedItemsToShow function properly Replaced the hardcoded 20 by the value of numReturnedItemsToShow to display the right number of items in check in. Test plan: 1- Make lots of checkouts, at least like 40 (I used the batchCheckouts feature) 2- Go to Circulation > Check in 3- Return 21 items The last 20 items returned will be displayed 4- Change numReturnedItemsToShow to 50 5- Return a couple more items Only the last 20 returned items are displayed 6- Change numReturnedItemsToShow to 10 7- Return a couple more items Only the last 10 returned items are displayed 8- Apply the patch 9- Change numReturnedItemsToShow back to 20 10- Do steps 1 to 7 again, but this time step 5 returns the right amount of items Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140392|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 140393 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140393&action=edit Bug 30802: Make numReturnedItemsToShow function properly Replaced the hardcoded 20 by the value of numReturnedItemsToShow to display the right number of items in check in. Test plan: 1- Make lots of checkouts, at least like 40 (I used the batchCheckouts feature) 2- Go to Circulation > Check in 3- Return 21 items The last 20 items returned will be displayed 4- Change numReturnedItemsToShow to 50 5- Return a couple more items Only the last 20 returned items are displayed 6- Change numReturnedItemsToShow to 10 7- Return a couple more items Only the last 10 returned items are displayed 8- Apply the patch 9- Change numReturnedItemsToShow back to 20 10- Do steps 1 to 7 again, but this time step 5 returns the right amount of items Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=30802 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140393|0 |1 is obsolete| | --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140573 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140573&action=edit Bug 30802: Make numReturnedItemsToShow function properly Replaced the hardcoded 20 by the value of numReturnedItemsToShow to display the right number of items in check in. Test plan: 1- Make lots of checkouts, at least like 40 (I used the batchCheckouts feature) 2- Go to Circulation > Check in 3- Return 21 items The last 20 items returned will be displayed 4- Change numReturnedItemsToShow to 50 5- Return a couple more items Only the last 20 returned items are displayed 6- Change numReturnedItemsToShow to 10 7- Return a couple more items Only the last 10 returned items are displayed 8- Apply the patch 9- Change numReturnedItemsToShow back to 20 10- Do steps 1 to 7 again, but this time step 5 returns the right amount of items Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140574 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140574&action=edit Bug 30802: (QA follow-up) Simplify a ternary Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Jay. My first qa from Debian 11 master container ;) With a working git-bz still needing python2.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.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=30802 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30802 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Resolution|--- |FIXED Status|Pushed to master |RESOLVED --- Comment #15 from Lucas Gass <lucas@bywatersolutions.com> --- Enhancement will not be backported to 22.05.x series -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org