[Koha-devel] Get rid of item-level_itype?

Jonathan Druart jonathan.druart at bugs.koha-community.org
Thu Dec 17 17:41:32 CET 2015


Thanks all for your answers.

I have played a bit with the code, and I would propose the following:

Update DB migration:
1/ add column biblio.biblio_type
2/ update biblio.biblio_type with biblioitems.itemtype
3/ rename items.itype with items.item_type
4/ set items.item_type = biblio.biblio_type if items.item_type is not
defined (or if item_level_itypes is not set?)
5/ rename deleteditems.itype with items.item_type, and don't update it (right?)
6/ drop column biblioitems.itemtype
7/ rename course_items.itype with course_items.item_type (to be consistent)

Then we will have to replace the notices ^items.itype^items.item_type^
and ^biblioitems.itemtype^biblio.biblio_type^ should solve the
problem.

Looking at the code, I have found some places where I am not sure how
to fix the display:
1/ For instance on the detail page of a biblio, or when a user place a
hold, the item type is display either *on top* of the items list, or
*in* a specific column of the table.
Which makes sense. If we remove the pref, we have 3 choices:
  a. always display the item type in the table
  b. display the item type on top only if all item types are identical
at the biblio type (will require some additional loops)
  c. display both and set a css class: the library will be able to
hide the one it wants
  d. the answer d

2/ The change will require a complete reindexation of zebra: the index
will be renamed  (itype => item_type, mc-itype => mc-item_type,
itemtype => biblio_type, mc-itemtype => mc-biblio_type).
Is it acceptable?

I think I can  produce a patch in 2 days of work (which is nothing
compared to the number of days Koha developpers have lost to
understand how this code works...), but it will require a lot of deep
testing.
It will really hard to provide tests for this change since it impacts
a lot of file, but I will write some for the most common subroutines.

I would like some people engaged in the signoff process, not to let
the patches in the signoff queue too long.

Cheers,
Jonathan

2015-12-11 12:04 GMT+00:00 Jonathan Druart
<jonathan.druart at bugs.koha-community.org>:
> Hi devs,
>
> Friday is a good day for this kind of questions, fasten your seat belt
> for a time travel.
>
> As many of you know, the item type is not correctly managed all around
> the different Koha modules. Sometimes it's, sometimes it's not.
> The main issue is that we deal with it at too many places and the code
> is not clean/centralised at all.
>
> So I have searched for previous discussions on this subject and I have
> found this "Abandoned RFC" on the wiki :
> http://wiki.koha-community.org/wiki/Mandate_item-level_circulation_rules_RFC
> filled from this koha-devel thread
> http://lists.koha-community.org/pipermail/koha-devel/2008-October/031144.html
>
> The questions are:
> 1/ Is this still valid?
> 2/ Is there something missing in the different steps described?
> 3/ Does someone have some other suggestions to do?
>
> I would be happy to provide this change but first I would like to get
> confirmation about it and get people involved in signoffing/QAing the
> possible patch set.
>
> Cheers,
> Jonathan


More information about the Koha-devel mailing list