Re: [Koha] stack number cannot be stored in Koha 21.05

2021-10-06 Thread Michael Kuhn

Hi Katrin

> ah ok, that was a local change then?

Yes, it definitely seems so.

> Because it looks like it has always been tinyint:
>
> 
https://git.koha-community.org/Koha-community/Koha/src/branch/master/installer/data/mysql/kohastructure.sql#L3015 


>
> 
https://git.koha-community.org/Koha-community/Koha/src/branch/18.11.x/installer/data/mysql/kohastructure.sql#L932 


>
> 
https://git.koha-community.org/Koha-community/Koha/src/branch/3.2.x/installer/data/mysql/kohastructure.sql#L994 



Yes, I had checked that already.

> varchar should work on database side, I am not aware of a code side
> check, but there could be one.

Well, it doesn't... that's why I thought of a possible code side check...

> Anything helpful in the logs maybe?

No, unfortunately I couldn't find anything and I'm fed up doing further 
tests. My plan for now is to address the guy I suspect to be responsible 
for this (I didn't mention it but he even wrote a Perl script to 
automatically fill MARC 952$j with the next free number - including a 
letter).


> Maybe worth checking if deleteditems was altered as well.

"deleteditems" has datatype tinyint.

Many thanks again for your input!

Best wishes: Michael
--
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E m...@adminkuhn.ch · W www.adminkuhn.ch
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] stack number cannot be stored in Koha 21.05

2021-10-06 Thread Katrin Fischer

Hi Michael,

ah ok, that was a local change then?

Because it looks like it has always been tinyint:

https://git.koha-community.org/Koha-community/Koha/src/branch/master/installer/data/mysql/kohastructure.sql#L3015

https://git.koha-community.org/Koha-community/Koha/src/branch/18.11.x/installer/data/mysql/kohastructure.sql#L932

https://git.koha-community.org/Koha-community/Koha/src/branch/3.2.x/installer/data/mysql/kohastructure.sql#L994

varchar should work on database side, I am not aware of a code side
check, but there could be one. Anything helpful in the logs maybe?

Maybe worth checking if deleteditems was altered as well.

Katrin

|
|


On 06.10.21 21:39, Michael Kuhn wrote:

Hi Katrin

> 952$j is mapped to items.stack by default that has the datatype
> tinyint(1) in the database. A common problem I have encountered here
> is that it won't save when you try to store something non-numeric or
> outside the range of tinyint. Could that be the issue?

Yes, this would indeed be a problem... Thank you very much for the hint!

Our library was working with Koha 18.11 before - where it was possible
to store content like "m011577".

Looking into http://schema.koha-community.org/18_11/tables/items.html
shows that in this version the datatype was BIT(0) which seems to mean
mean "tinyint". In my Koha 21.05 demo installation I see it actually
is "tinyint".

However when asking the actual Koha 21.05 library database the
datatype is given as "varchar"!

So it seems like someone has unscrupulously changed the datatype of
this field in the past (a very bad idea). But then again - shouldn't
the database accept value "m011577" when the datatype is "varchar"? At
least in Koha 18.11 it seems to have worked.

I was able to successfuilly insert "011577". But not "m011577". Is
there maybe a script that checks if the values are of the correct
datatype when trying to store anything in the database? Maybe the guy
responsible for this problem also changed the datatype in such a script?

Best wishes: Michael

___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] stack number cannot be stored in Koha 21.05

2021-10-06 Thread Michael Kuhn

Hi Katrin

> 952$j is mapped to items.stack by default that has the datatype
> tinyint(1) in the database. A common problem I have encountered here
> is that it won't save when you try to store something non-numeric or
> outside the range of tinyint. Could that be the issue?

Yes, this would indeed be a problem... Thank you very much for the hint!

Our library was working with Koha 18.11 before - where it was possible 
to store content like "m011577".


Looking into http://schema.koha-community.org/18_11/tables/items.html 
shows that in this version the datatype was BIT(0) which seems to mean 
mean "tinyint". In my Koha 21.05 demo installation I see it actually is 
"tinyint".


However when asking the actual Koha 21.05 library database the datatype 
is given as "varchar"!


So it seems like someone has unscrupulously changed the datatype of this 
field in the past (a very bad idea). But then again - shouldn't the 
database accept value "m011577" when the datatype is "varchar"? At least 
in Koha 18.11 it seems to have worked.


I was able to successfuilly insert "011577". But not "m011577". Is there 
maybe a script that checks if the values are of the correct datatype 
when trying to store anything in the database? Maybe the guy responsible 
for this problem also changed the datatype in such a script?


Best wishes: Michael
--
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E m...@adminkuhn.ch · W www.adminkuhn.ch
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] stack number cannot be stored in Koha 21.05

2021-10-06 Thread Katrin Fischer

Hi Michael,

952$j is mapped to items.stack by default that has the datatype
tinyint(1) in the database. A common problem I have encountered here is
that it won't save when you try to store something non-numeric or
outside the range of tinyint. Could that be the issue?

Katrin

On 06.10.21 20:47, Michael Kuhn wrote:

Hi

In our library we use Koha 21.05.02 on Debian GNU/Linux 11.

As we found out it not possible to store the content of field 952$j
(stack / shelving control number) in the Koha database. I have also
tested this on my demo installation with Koha 21.05.00 and on another
demo installation with Koha 21.05.04 - everywhere the same.

Can anyone please confirm this? If yes, I will open a bug report.

Best wishes: Michael

___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


[Koha] stack number cannot be stored in Koha 21.05

2021-10-06 Thread Michael Kuhn

Hi

In our library we use Koha 21.05.02 on Debian GNU/Linux 11.

As we found out it not possible to store the content of field 952$j 
(stack / shelving control number) in the Koha database. I have also 
tested this on my demo installation with Koha 21.05.00 and on another 
demo installation with Koha 21.05.04 - everywhere the same.


Can anyone please confirm this? If yes, I will open a bug report.

Best wishes: Michael
--
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E m...@adminkuhn.ch · W www.adminkuhn.ch
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha