Bug 39062 - Increase length of items.stocknumber (Inventory Number)
Summary: Increase length of items.stocknumber (Inventory Number)
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Andrew Fuerste-Henry
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-06 21:21 UTC by Andrew Fuerste-Henry
Modified: 2025-03-10 13:05 UTC (History)
2 users (show)

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


Attachments
Bug 39062: increase length of items.stocknumber and deleteditems.stocknumber in kohastructure.sql (2.63 KB, patch)
2025-02-06 21:52 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 39062: Increase stocknumber length in items and deleteditems (1.57 KB, patch)
2025-02-06 21:52 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 39062: Increase stocknumber length in items and deleteditems (1.29 KB, patch)
2025-02-06 21:56 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 39062: increase length of items.stocknumber and deleteditems.stocknumber in kohastructure.sql (2.63 KB, patch)
2025-02-10 14:29 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 39062: Increase stocknumber length in items and deleteditems (1.57 KB, patch)
2025-02-10 14:29 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 39062: increase length of items.stocknumber and deleteditems.stocknumber in kohastructure.sql (2.68 KB, patch)
2025-02-10 23:55 UTC, David Cook
Details | Diff | Splinter Review
Bug 39062: Increase stocknumber length in items and deleteditems (1.62 KB, patch)
2025-02-10 23:55 UTC, David Cook
Details | Diff | Splinter Review
Bug 39062: (QA follow-up): Tidying the atomic update (1.46 KB, patch)
2025-03-10 13:05 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2025-02-06 21:21:03 UTC
items.stocknumber (labeled as Inventory Number, 952$i, in edit interface) is a field that many libraries use to hold an idiosyncratic bit of local data. For such libraries, the 32 character limit can be an issue. If there's a compelling reason not to increase the size of this field, I haven't thought of or found it.
Comment 1 Andrew Fuerste-Henry 2025-02-06 21:52:31 UTC
Created attachment 177602 [details] [review]
Bug 39062: increase length of items.stocknumber and deleteditems.stocknumber in kohastructure.sql

To test:
1: try to save a value in the 952$i that is more than 32 characters
2: It does not work.
3: apply patch
4: try to save a value in the 952$i that is more than 32 characters
5: it does work!
6: delete your item and use a report to confirm the full string is in deleteditems.stocknumber
7: Maybe use DESCRIBE from mysql commandline to see the length and confirm it's changed?
Comment 2 Andrew Fuerste-Henry 2025-02-06 21:52:33 UTC
Created attachment 177603 [details] [review]
Bug 39062: Increase stocknumber length in items and deleteditems
Comment 3 Andrew Fuerste-Henry 2025-02-06 21:56:31 UTC
Created attachment 177604 [details] [review]
Bug 39062: Increase stocknumber length in items and deleteditems

But this time I spelled deleted correctly.
Comment 4 David Cook 2025-02-09 23:06:18 UTC
At a glance, I think you've accidentally obsoleted a patch you shouldn't have. I'll try to restore that...
Comment 5 Andrew Fuerste-Henry 2025-02-10 14:29:24 UTC
Created attachment 177697 [details] [review]
Bug 39062: increase length of items.stocknumber and deleteditems.stocknumber in kohastructure.sql

To test:
1: try to save a value in the 952$i that is more than 32 characters
2: It does not work.
3: apply patch
4: try to save a value in the 952$i that is more than 32 characters
5: it does work!
6: delete your item and use a report to confirm the full string is in deleteditems.stocknumber
7: Maybe use DESCRIBE from mysql commandline to see the length and confirm it's changed?
Comment 6 Andrew Fuerste-Henry 2025-02-10 14:29:26 UTC
Created attachment 177698 [details] [review]
Bug 39062: Increase stocknumber length in items and deleteditems
Comment 7 Andrew Fuerste-Henry 2025-02-10 14:38:54 UTC
(In reply to David Cook from comment #4)
> At a glance, I think you've accidentally obsoleted a patch you shouldn't
> have. I'll try to restore that...

Thanks, I think I've successfully fixed those into one patch!
Comment 8 David Cook 2025-02-10 22:30:45 UTC
(In reply to Andrew Fuerste-Henry from comment #7)
> (In reply to David Cook from comment #4)
> > At a glance, I think you've accidentally obsoleted a patch you shouldn't
> > have. I'll try to restore that...
> 
> Thanks, I think I've successfully fixed those into one patch!

Looks good!
Comment 9 David Cook 2025-02-10 23:54:37 UTC
The test report should probably mentioning needing to update the database in addition to applying the patch, but all good...
Comment 10 David Cook 2025-02-10 23:55:18 UTC
QA tools complaining about tidiness but I think we're not caring about that anymore...

 WARN   installer/data/mysql/atomicupdate/bug_39062_increase_stocknumber_length.pl
   WARN   tidiness
                The file is less tidy than before (bad/messy lines before: 0, now: 2)

 OK     installer/data/mysql/kohastructure.sql
Comment 11 David Cook 2025-02-10 23:55:47 UTC
Created attachment 177716 [details] [review]
Bug 39062: increase length of items.stocknumber and deleteditems.stocknumber in kohastructure.sql

To test:
1: try to save a value in the 952$i that is more than 32 characters
2: It does not work.
3: apply patch
4: try to save a value in the 952$i that is more than 32 characters
5: it does work!
6: delete your item and use a report to confirm the full string is in deleteditems.stocknumber
7: Maybe use DESCRIBE from mysql commandline to see the length and confirm it's changed?

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 12 David Cook 2025-02-10 23:55:49 UTC
Created attachment 177717 [details] [review]
Bug 39062: Increase stocknumber length in items and deleteditems

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 13 Marcel de Rooy 2025-03-07 08:58:03 UTC
 FAIL   installer/data/mysql/atomicupdate/bug_39062_increase_stocknumber_length.pl
   FAIL   tidiness
                File is not tidy, please run `perl misc/devel/tidy.pl installer/data/mysql/atomicupdate/bug_39062_increase_stocknumber_length.pl`
Comment 14 Andrew Fuerste-Henry 2025-03-10 13:05:31 UTC
Created attachment 179114 [details] [review]
Bug 39062: (QA follow-up): Tidying the atomic update