Bug 13379

Summary: authorised_values.category is varchar(16)
Product: Koha Reporter: Jonathan Druart <jonathan.druart+koha>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart+koha>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: bgkriegel, katrin.fischer, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 13380, 15069    
Attachments: Bug 13379: Extends authorised_values.category to varchar(32)
[SIGNED-OFF] Bug 13379: Extends authorised_values.category to varchar(32)
[PASSED QA] Bug 13379: Extends authorised_values.category to varchar(32)

Description Jonathan Druart 2014-12-03 11:36:15 UTC
But borrower_attribute_types is varchar(10).
So if you try to link a patron attribute type with an AV category with a length > 10, the link won't be done.

Also, I propose to extend this field to varchar(32).
Comment 1 Jonathan Druart 2014-12-03 11:43:19 UTC Comment hidden (obsolete)
Comment 2 Bernardo Gonzalez Kriegel 2014-12-04 16:45:43 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2014-12-05 14:55:22 UTC
Created attachment 34143 [details] [review]
[PASSED QA] Bug 13379: Extends authorised_values.category to varchar(32)

This patch does 2 things:
1/ It fixes a bug caused by the different data fields used for
authorised_values.category and
borrower_attribute_types.authorised_value_category (varchar(16) vs
varchar(10)).
To reproduce:
- Create a AV category with a length > 10
- Try to link a patron attribute type with this AV, it won't work.

2/ Extends this field to varchar(32): sometime 16 is not enough to
describe something

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors. Error reproduced, fixed by patch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Katrin Fischer 2014-12-09 06:46:07 UTC
Just a note: aqbudgets.sort1_authcat and aqbudgets.sort2_authcat wre both varchar(80) - so there is another mismatch, although it should not cause any trouble. Not sure if we should shrink it to match and if so, we should do it on another bug).
Comment 5 Tomás Cohen Arazi 2015-01-04 16:08:14 UTC
Patch pushed to master.

Thanks Jonathan!