[Koha-devel] Koha::Item->is_notforloan (see Bug 30636)

Fridolin SOMERS fridolin.somers at biblibre.com
Thu Apr 28 21:27:39 CEST 2022


+1

->is_xxx for a boolean makes sens.

Le 27/04/2022 à 18:48, dcook at prosentient.com.au a écrit :
> Hi all,
> 
> While working on 
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30636 
> <https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30636>, I 
> noticed that our usage of Koha::Item->notforloan is problematic. 
> Sometimes we use it as a Boolean and sometimes we use it for descriptive 
> information.
> 
> When we use it as a Boolean, we really should be taking into account the 
> “Not for loan” status by “Item Type” as well.
> 
> I’m noticing there are places in Koha which show an item as “Available” 
> if the item is “Not for loan” by item type and that’s a problem. (It 
> looks like the new recalls feature from Bug 19532 has this same problem.)
> 
> Anyway, I’m thinking a new method like Koha::Item->is_notforloan might 
> be a good idea for covering the Boolean condition rather than trying to 
> remember to implement Koha::Item->notforloan and 
> Koha::Item->notforloan_per_itemtype (this method doesn’t even exist) for 
> all relevant use cases.
> 
> One way or another, I’ll be fixing the ILS-DI API locally, but I’d like 
> to get people’s input first, so that it’s easier for  me to upstream and 
> benefit everyone else too.
> 
> David Cook
> 
> Senior Software Engineer
> 
> Prosentient Systems
> 
> Suite 7.03
> 
> 6a Glen St
> 
> Milsons Point NSW 2061
> 
> Australia
> 
> Office: 02 9212 0899
> 
> Online: 02 8005 0595
> 
> 
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : https://www.koha-community.org/
> git : https://git.koha-community.org/
> bugs : https://bugs.koha-community.org/

-- 
Fridolin SOMERS <fridolin.somers at biblibre.com>
Software and system maintainer 🦄
BibLibre, France


More information about the Koha-devel mailing list