21.11 my $item = Koha::Items->find($itemnumber); # FIXME Handle non existent item [L426] my $olditemlost = $item->itemlost; MASTER my $itemnumber = $input->param('itemnumber'); my $item = Koha::Items->find($itemnumber); # FIXME Handle non existent item [L535] my $olditemlost = $item->itemlost; Confirming the FIXME ;)
Where was that btw? cataloguing/additem.pl: my $olditemlost = $item->itemlost; L552 (current master) # FIXME Handle non existent item my $olditemlost = $item->itemlost;
Created attachment 158240 [details] [review] Bug 32379: Add check on existing item Simplest fix; bail out with output_error. Test plan: Try /cgi-bin/koha/cataloguing/additem.pl?biblionumber=1&op=saveitem&itemnumber=999999 Note: Replace 1 by existing biblionumber, and iitem 999999 should not exist. You should get the 404 screen now. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 158264 [details] [review] Bug 32379: Add check on existing item Simplest fix; bail out with output_error. Test plan: Try /cgi-bin/koha/cataloguing/additem.pl?biblionumber=1&op=saveitem&itemnumber=999999 Note: Replace 1 by existing biblionumber, and iitem 999999 should not exist. You should get the 404 screen now. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 158385 [details] [review] Bug 32379: Add check on existing item Simplest fix; bail out with output_error. Test plan: Try /cgi-bin/koha/cataloguing/additem.pl?biblionumber=1&op=saveitem&itemnumber=999999 Note: Replace 1 by existing biblionumber, and iitem 999999 should not exist. You should get the 404 screen now. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.06
Nice work everyone! Pushed to 22.11.x for next release