Bug 13379 - authorised_values.category is varchar(16)
Summary: authorised_values.category is varchar(16)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 13380 15069
  Show dependency treegraph
 
Reported: 2014-12-03 11:36 UTC by Jonathan Druart
Modified: 2016-06-21 21:36 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13379: Extends authorised_values.category to varchar(32) (5.09 KB, patch)
2014-12-03 11:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13379: Extends authorised_values.category to varchar(32) (5.21 KB, patch)
2014-12-04 16:45 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 13379: Extends authorised_values.category to varchar(32) (5.26 KB, patch)
2014-12-05 14:55 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!