Summary: | URI column in the items table is limited to 255 characters | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Architecture, internals, and plumbing | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | 1joynelson, dcook, fridolin.somers, jonathan.druart, lucas, m.de.rooy, marjorie.barry-vila |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21009 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21800 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13574 |
||
Change sponsored?: | --- | Patch complexity: | Medium patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.05.00, 19.11.04, 19.05.09
|
|
Circulation function: | |||
Attachments: |
Bug 20882: Move items.uri to mediumtext
Bug 20882: Move items.uri to mediumtext Bug 20882: Move items.uri to mediumtext |
Description
Nick Clemens (kidclamp)
2018-06-05 10:52:30 UTC
biblioitems.url now uses MEDIUMTEXT However, I don't think items.uri necessarily need to be the same as biblioitems.url. With biblioitems.url, multiple URLs are concatenated in the same field, but items.uri should only ever store 1 URL. This link presents a number of different length limits for 1 URL: https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers The largest CloudFlare seems to support is 32Kb and a TEXT field can store 64KB. I suppose using MEDIUMTEXT could provide some future proofing, but TEXT is probably good enough for items.uri. (In reply to David Cook from comment #1) > biblioitems.url now uses MEDIUMTEXT > > However, I don't think items.uri necessarily need to be the same as > biblioitems.url. Since it is variable length, I dont think making the distinction is needed. The link you gave talks about keeping it under 2048 btw. I would go for MEDIUMTEXT here too for consistency. > With biblioitems.url, multiple URLs are concatenated in the same field, but > items.uri should only ever store 1 URL. Why only ever 1? Our 952$u is derived from 852$u which is a repeatable field. Unfortunately our editor does not yet support it [1]. But the Koha to MARC mapping underneath supports url1 | url2 | url3 etc., like in biblioitems.url. [1] It does not support adding a subfield directly. But if you save url1 | url2 in $u and reopen the item record, the field is cloned for you. Editing and savin g again is supported now too. Which is something that we wanted to prevent on bug 21800 but luckily we did not yet so far ;) (In reply to Marcel de Rooy from comment #2) > [1] It does not support adding a subfield directly. But if you save url1 | > url2 in $u and reopen the item record, the field is cloned for you. Editing > and savin g again is supported now too. Which is something that we wanted to > prevent on bug 21800 but luckily we did not yet so far ;) Not even completely true. In master you can set the item field repeatable and you have a clone button. It acts a bit weird but works. See bug 13574. Created attachment 98658 [details] [review] Bug 20882: Move items.uri to mediumtext Applies to items and deleteditems. Test plan: Run new install or upgrade. Check field size. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 98661 [details] [review] Bug 20882: Move items.uri to mediumtext Applies to items and deleteditems. Test plan: Run new install or upgrade. Check field size. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> (In reply to Nick Clemens from comment #5) > Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Thx for very fast SO ! Created attachment 98995 [details] [review] Bug 20882: Move items.uri to mediumtext Applies to items and deleteditems. Test plan: Run new install or upgrade. Check field size. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> (In reply to Marcel de Rooy from comment #6) > (In reply to Nick Clemens from comment #5) > > Signed-off-by: Nick Clemens <nick@bywatersolutions.com> > > Thx for very fast SO ! Thx for a nice clean patch and not forgetting about deleteditems :) Nice work everyone! Pushed to master for 20.05 Pushed to 19.11.x branch for 19.11.04 backported to 19.05.x for 19.05.09 (In reply to Lucas Gass from comment #11) > backported to 19.05.x for 19.05.09 Lucas, there is a typo in commit 7b3c2d287ace83ac19747e31f858e8b2beccdc2e Bug 20882: DBRev 19.05.08.001 -#!/usr/bin/perl +#!/USr/bin/perl DBIx class changes has been pushed in 19.11.08 : 58e7d0b44a Bug 20882: DBIC |