[Bug 31716] New: Enlarge the size of the authorised_value column in authorised_values
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 Bug ID: 31716 Summary: Enlarge the size of the authorised_value column in authorised_values Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Some libraries want to store URLs or longer values in the AVs to make entry easier. Currently there is an 80 character limit -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 141520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141520&action=edit Bug 31716: Enlagre the authorised_value column in authorised_values To test: 1 - Apply patch 2 - Update database 3 - Confirm you can store a longer value in authorised_values -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 141521 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141521&action=edit Bug 31716: DO NOT PUSH - Schema updates -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- I can now update an authorized value code using the database, but I can't add or edit using the staff interface as the form entry's maximum length is 80: <input type="text" id="authorised_value" name="authorised_value" value="" maxlength="80" class="focus" />. When you do try to edit an entry, you get this message on the edit form "Please enter no more than 80 characters." To update a value in the database: 1. koha-mysql kohadev 2. After applying the patch (I also ran dbic - not sure whether that is required) you can see that the change to the database structure has been enabled: show columns from authorised_values; 3. SQL to update an entry - where XXXX = the id of an existing entry: update authorised_values set authorised_value="This is a really really long authorized value although I am not sure why you would want such a code" where id = XXXX; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- ALTER TABLE authorised_values MODIFY COLUMN authorised_value varchar(255) You go from 80 to 255. At some point that is too low again. We should imo go to a TEXT type: A TEXT column with a maximum length of 65,535 (216 - 1) characters. One point: VARCHAR columns can be fully indexed. TEXT columns can only be indexed over a specified length. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141520|0 |1 is obsolete| | Attachment #141521|0 |1 is obsolete| | --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 141722 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141722&action=edit Bug 31716: Enlarge the authorised_value column in authorised_values This patch changes authorised_value from VARCHAR(80) to VARCHAR(255) To test: 1 - Apply patch 2 - Update database 3 - Confirm you can store a longer value in authorised_values -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 141723 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141723&action=edit Bug 31716: Prevent issues with foreign key VARCHAR is now allowed to be 65535 bytes max, as opposed to 255 - when testing this, however, I received errors about latering a column with a foreign key. Adding this to the update to avoid problems like bug 31673. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 141724 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141724&action=edit Bug 31716: DO NOT PUSH - Schema updates -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to David Nind from comment #3)
I can now update an authorized value code using the database, but I can't add or edit using the staff interface as the form entry's maximum length is 80: <input type="text" id="authorised_value" name="authorised_value" value="" maxlength="80" class="focus" />.
Fixed (In reply to Marcel de Rooy from comment #4)
You go from 80 to 255. At some point that is too low again. We should imo go to a TEXT type: A TEXT column with a maximum length of 65,535 (216 - 1) characters. One point: VARCHAR columns can be fully indexed. TEXT columns can only be indexed over a specified length.
Some versions of MySQL/Maria allow varchar up to 65535 - so we can increase in future as needed - this was the largest push without more work and sufficient for current needs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens from comment #8)
(In reply to Marcel de Rooy from comment #4)
You go from 80 to 255. At some point that is too low again. We should imo go to a TEXT type: A TEXT column with a maximum length of 65,535 (216 - 1) characters. One point: VARCHAR columns can be fully indexed. TEXT columns can only be indexed over a specified length.
Some versions of MySQL/Maria allow varchar up to 65535 - so we can increase in future as needed - this was the largest push without more work and sufficient for current needs
URLs could be up to 2048 chars? Note that addressing the authorized values table is only half of the work. The receiving column should be able to store it too. But you know :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Marcel de Rooy from comment #9)
(In reply to Nick Clemens from comment #8)
(In reply to Marcel de Rooy from comment #4)
URLs could be up to 2048 chars? Note that addressing the authorized values table is only half of the work. The receiving column should be able to store it too. But you know :)
Indeed, flexibility comes with responsibility sometimes :-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31740 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141722|0 |1 is obsolete| | --- Comment #11 from David Nind <david@davidnind.com> --- Created attachment 141904 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141904&action=edit Bug 31716: Enlarge the authorised_value column in authorised_values This patch changes authorised_value from VARCHAR(80) to VARCHAR(255) To test: 1 - Apply patch 2 - Update database 3 - Confirm you can store a longer value in authorised_values Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141723|0 |1 is obsolete| | --- Comment #12 from David Nind <david@davidnind.com> --- Created attachment 141905 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141905&action=edit Bug 31716: Prevent issues with foreign key VARCHAR is now allowed to be 65535 bytes max, as opposed to 255 - when testing this, however, I received errors about latering a column with a foreign key. Adding this to the update to avoid problems like bug 31673. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141724|0 |1 is obsolete| | --- Comment #13 from David Nind <david@davidnind.com> --- Created attachment 141906 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141906&action=edit Bug 31716: DO NOT PUSH - Schema updates Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #14 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- And you make them mismatch again. All columns must be modified IMO (and be FK ideally). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #14)
And you make them mismatch again. All columns must be modified IMO (and be FK ideally).
What is mismatching? Can you provide some detail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Nick Clemens from comment #15)
(In reply to Jonathan Druart from comment #14)
And you make them mismatch again. All columns must be modified IMO (and be FK ideally).
What is mismatching? Can you provide some detail
Actually this concerns me too. When you allow to have longer values for the code, we will have the situation, that people are likely to create longer descriptions that won't in most places. Think: items.ccode, items.location, asort1/asort2 in aqorders etc. May I make a different suggestion? If these are for cataloguing, maybe we could make it an option in the frameworks so that not the code but the description will be stored. That might prove nice in other situations as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- longer descriptions should be 'longer codes'! I don't mind the long descriptions... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I feel it would be worth to learn more about the use case here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|nick@bywatersolutions.com |koha-bugs@lists.koha-commun | |ity.org Status|Failed QA |ASSIGNED --- Comment #19 from Nick Clemens <nick@bywatersolutions.com> --- Resolved using hardcoded JS, not going to keep working on this one -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31716 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|NEW |RESOLVED --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Nick Clemens from comment #19)
Resolved using hardcoded JS, not going to keep working on this one
-- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org