To recreate: 1. Item type defined at item level (item-level_itypes=1) 2. Mark an item type not for loan (itemtypes.notforloan=1) 3. Checkout an item using this item type (items.itype="BK" for instance) => Checkout is not blocked! I suspect commit 3953fdb921d7f280ffbaca813956357aa67d42ca Bug 19943: Remove itemtype vs itype confusion in CanBookBeIssued to be the root of this issue. One occurrence of $item->{itemtype} has not been replaced. In this case it refers to the biblioitem->{itemtype} value whereas we want to use $item->{itype}. So this issue does not happen if items.itype==biblioitem.itemtype (just in case you are not reproducing the problem).
Created attachment 75859 [details] [review] Bug 20889: Add tests - not for loan items cannot be checked out
Created attachment 75860 [details] [review] Bug 20889: Prevent not for loan items to be checked out 1. Item type defined at item level (item-level_itypes=1) 2. Mark an item type not for loan (itemtypes.notforloan=1) 3. Checkout an item using this item type (items.itype="BK" for instance) => Checkout is not blocked! I suspect commit 3953fdb921d7f280ffbaca813956357aa67d42ca Bug 19943: Remove itemtype vs itype confusion in CanBookBeIssued to be the root of this issue. One occurrence of $item->{itemtype} has not been replaced. In this case it refers to the biblioitem->{itemtype} value whereas we want to use $item->{itype}. So this issue does not happen if items.itype==biblioitem.itemtype (just in case you are not reproducing the problem). Test plan: Make sure not for loan items cannot be checked out
Fridolin, I would suggest you to backport the unit tests.
Created attachment 75865 [details] [review] Bug 20889: Add tests - not for loan items cannot be checked out Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 75866 [details] [review] Bug 20889: Prevent not for loan items to be checked out 1. Item type defined at item level (item-level_itypes=1) 2. Mark an item type not for loan (itemtypes.notforloan=1) 3. Checkout an item using this item type (items.itype="BK" for instance) => Checkout is not blocked! I suspect commit 3953fdb921d7f280ffbaca813956357aa67d42ca Bug 19943: Remove itemtype vs itype confusion in CanBookBeIssued to be the root of this issue. One occurrence of $item->{itemtype} has not been replaced. In this case it refers to the biblioitem->{itemtype} value whereas we want to use $item->{itype}. So this issue does not happen if items.itype==biblioitem.itemtype (just in case you are not reproducing the problem). Test plan: Make sure not for loan items cannot be checked out Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Just a description not for loan at item type level second time should be item level
Created attachment 75876 [details] [review] Bug 20889: Add tests - not for loan items cannot be checked out Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 75877 [details] [review] Bug 20889: Prevent not for loan items to be checked out 1. Item type defined at item level (item-level_itypes=1) 2. Mark an item type not for loan (itemtypes.notforloan=1) 3. Checkout an item using this item type (items.itype="BK" for instance) => Checkout is not blocked! I suspect commit 3953fdb921d7f280ffbaca813956357aa67d42ca Bug 19943: Remove itemtype vs itype confusion in CanBookBeIssued to be the root of this issue. One occurrence of $item->{itemtype} has not been replaced. In this case it refers to the biblioitem->{itemtype} value whereas we want to use $item->{itype}. So this issue does not happen if items.itype==biblioitem.itemtype (just in case you are not reproducing the problem). Test plan: Make sure not for loan items cannot be checked out Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 18.11, awesome work all!
This patch has been pushed to 18.05.x and will be in 18.05.01
Depends on Bug 19943 not in 17.11.x
There still seems something off - if the user has a restriction and you use the 'temporary override' you can check out the item still. Even when AllowNotForLoanOverride doesn't allow that. Separate bug?
Ack, there are sooo many combinations ;). A new bug I reckon as this one is pushed and closed please Katrin :)
You are right ;) Bug 20963