[Bug 10215] New: Increase the size of opacnote and librariannote for table subscriptionhistory
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Bug ID: 10215 Summary: Increase the size of opacnote and librariannote for table subscriptionhistory Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: kyle.m.hall@gmail.com CC: colin.campbell@ptfs-europe.com We have librarians that are regularly hitting the maximum number of characters for the note fields in subscription history. They would like to be able to store at least 1000 characters here. Converting the varchar(150) to text should do it. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 17998 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17998&action=edit Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17998|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 17999 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17999&action=edit Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory We have librarians that are regularly hitting the maximum number of characters for the note fields in subscription history. They would like to be able to store at least 1000 characters here. Converting the varchar(150) to text should do it. Test Plan: 1) Apply this patch 2) Run updatedatabase.pl 3) Add public and private notes to a subscription history entry where each note is greater than 150 characters. 4) Save and view the notes, the notes should not be truncated. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Severity|enhancement |minor --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think this has potential as a bug. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jcamins@cpbibliography.com --- Comment #4 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- *** Bug 10116 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |gmcharlt@gmail.com --- Comment #5 from Galen Charlton <gmcharlt@gmail.com> --- Alas, it can't be quite that simple -- MySQL doesn't allow default values for text and blob columns: mysql> ALTER TABLE subscriptionhistory CHANGE librariannote librariannote TEXT NOT NULL DEFAULT ''; Query OK, 1 row affected, 1 warning (0.15 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> show warnings; +---------+------+-------------------------------------------------------------+ | Level | Code | Message | +---------+------+-------------------------------------------------------------+ | Warning | 1101 | BLOB/TEXT column 'librariannote' can't have a default value | +---------+------+-------------------------------------------------------------+ 1 row in set (0.00 sec) Admittedly, by default this is just a warning; MySQL will blithely supply a default value (of '') for text columns. However, if we ever feel inspired to turn on stricter modes like STRICT_TRANS_TABLES (which I believe MariaDB does by default), problems will occur. I think making those two columns TEXT (and nullable) is the way to go. There might be a bit of additional code warranted to make sure that the Apache error log doesn't display spurious warnings about undef opacnote and librariannote. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17999|0 |1 is obsolete| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 19247 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19247&action=edit Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory We have librarians that are regularly hitting the maximum number of characters for the note fields in subscription history. They would like to be able to store at least 1000 characters here. Converting the varchar(150) to text should do it. Test Plan: 1) Apply this patch 2) Run updatedatabase.pl 3) Add public and private notes to a subscription history entry where each note is greater than 150 characters. 4) Save and view the notes, the notes should not be truncated. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 --- Comment #7 from Galen Charlton <gmcharlt@gmail.com> --- Comment on attachment 19247 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19247 Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory Review of attachment 19247: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=10215&attachment=19247) ----------------------------------------------------------------- ::: C4/Serials.pm @@ +483,4 @@
$subs->{startdate} = format_date( $subs->{startdate} ); $subs->{histstartdate} = format_date( $subs->{histstartdate} ); $subs->{histenddate} = format_date( $subs->{histenddate} ); + $subs->{opacnote} . q{} =~ s/\n/\<br\/\>/g;
$ perl -c C4/Serials.pm Can't modify constant item in substitution (s///) at C4/Serials.pm line 486, near "s/\n/\<br\/\>/g;" C4/Serials.pm had compilation errors. A patch that causes a module to fail to compile is an automatic Failed QA. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19247|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 19335 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19335&action=edit Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory We have librarians that are regularly hitting the maximum number of characters for the note fields in subscription history. They would like to be able to store at least 1000 characters here. Converting the varchar(150) to text should do it. Test Plan: 1) Apply this patch 2) Run updatedatabase.pl 3) Add public and private notes to a subscription history entry where each note is greater than 150 characters. 4) Save and view the notes, the notes should not be truncated. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 --- Comment #9 from Galen Charlton <gmcharlt@gmail.com> --- Comment on attachment 19335 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19335 Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory Review of attachment 19335: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=10215&attachment=19335) ----------------------------------------------------------------- ::: C4/Serials.pm @@ +483,4 @@
$subs->{startdate} = format_date( $subs->{startdate} ); $subs->{histstartdate} = format_date( $subs->{histstartdate} ); $subs->{histenddate} = format_date( $subs->{histenddate} ); + $subs->{opacnote} ||= q{};
Consider what happens if the opacnote happens to "0". The note entered by the user would not be displayed. Since 5.10 is the minimum version of Perl required by Koha, we can freely using the //= operator, and I recommend that you do that when you want to conditionally convert an undefined value to the empty string. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 marjorie barry-vila <marjorie.barry-vila@ccsr.qc.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@ccsr.qc | |.ca -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 8668 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Still valid in current master. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Would be nice to see this fixed! -- 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