[Bug 15030] New: Certain values in serials' items are lost on next edit
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Bug ID: 15030 Summary: Certain values in serials' items are lost on next edit Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: philippe.blouin@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: colin.campbell@ptfs-europe.com When editing serials subscription, we can edit them but some values are not pulled from the DB correctly to be put in the edit box. If not noticed, the value will be overwritten on the next save. Test: - Create a subscription - Edit itemcallnumber (952o?) and make sure to have a different value than the default one. - Save. - Edit it again - The saved value is not there. This is true for itemcallnumber and a few other fields. -- 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=15030 --- Comment #1 from Blou <philippe.blouin@inlibro.com> --- Created attachment 43601 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43601&action=edit Bug 15030 - Certain values in serials' items are lost on next edit When editing serials subscription, we can edit them but some values are not pulled from the DB correctly to be put in the edit box. If not noticed, the value will be overwritten on the next save. Test: - Create a subscription - Edit itemcallnumber (952o?) and make sure to have a different value than the default one. - Save. - Edit it again - The saved value is not there. This is true for itemcallnumber and a few other fields. This was caused by calls to ->field($subfield). This would always fail, of course. -- 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=15030 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch Assignee|koha-bugs@lists.koha-commun |philippe.blouin@inlibro.com |ity.org | CC| |eric.begin@inLibro.com, | |francois.charbonnier@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 --- Comment #2 from Blou <philippe.blouin@inlibro.com> --- Created attachment 43701 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43701&action=edit Bug 15030 - Fixes the serials fields associated with a plugin, to not overwrite the previously saved value This fixes the remaining fields from serials-edit.pl that were seeing their previously entered values be oblitarated with each new edit. The fields associated to a plugin (dateaccessioned and barcode) were always displaying <empty> with each new edit, losing the previous effort. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 --- Comment #3 from Blou <philippe.blouin@inlibro.com> --- Created attachment 43785 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43785&action=edit Bug 15030 - continue. The enumchron value was overwritten by 'header' even when value supplied -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 43601 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43601 Bug 15030 - Certain values in serials' items are lost on next edit Review of attachment 43601: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=15030&attachment=43601) ----------------------------------------------------------------- ::: C4/Items.pm @@ +2944,4 @@
if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.itemcallnumber' && $defaultvalues && $defaultvalues->{'callnumber'} ) { + if( $itemrecord and $defaultvalues and not $itemrecord->subfield($tag,$subfield) ){
YIKES! Nice find. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Okay... this modifies a routine in C4/Items.pm There is no test coverage directly for PrepareItemrecordDisplay. However, there is some in t/db_dependent/Serials.t I would recommend adding a test there to validate your changes as a separate commit. This would allow the test to run before applying the other patches (expecting failure), and after applying them (expecting passing). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |blocker -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44798 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44798&action=edit Bug 15030: Add tests This test will prevent regression on the lost of data when items.itemcallnumber is linked with a plugin. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Severity|blocker |critical --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- This is not "blocker". -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Lucio Moraes <lmoraes@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lmoraes@catalyst.net.nz --- Comment #8 from Lucio Moraes <lmoraes@catalyst.net.nz> --- Hi, could you be more specific with test plan? Thank you -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14895 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com Status|Needs Signoff |Patch doesn't apply --- Comment #9 from Josef Moravec <josef.moravec@gmail.com> --- There is conflict in t/db_dependent/Serials.t, could you please rebase? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44798|0 |1 is obsolete| | --- Comment #10 from Charles Farmer <charles.farmer@inlibro.com> --- Created attachment 45297 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45297&action=edit Bug 15030: Add tests This test will prevent regression on the lost of data when items.itemcallnumber is linked with a plugin. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 --- Comment #11 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 45297 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45297 Bug 15030: Add tests Review of attachment 45297: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=15030&attachment=45297) ----------------------------------------------------------------- ::: t/db_dependent/Serials.t @@ +22,5 @@
use_ok('C4::Serials'); }
my $dbh = C4::Context->dbh; +$dbh->do(q|UPDATE marc_subfield_structure SET value_builder="callnumber.pl" where kohafield="items.itemcallnumber" and frameworkcode=''|);
This is BEFORE the AutoCommit=0?! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45297|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45753 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45753&action=edit Bug 15030: Add tests This test will prevent regression on the lost of data when items.itemcallnumber is linked with a plugin. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to M. Tompsett from comment #11)
my $dbh = C4::Context->dbh; +$dbh->do(q|UPDATE marc_subfield_structure SET value_builder="callnumber.pl" where kohafield="items.itemcallnumber" and frameworkcode=''|);
This is BEFORE the AutoCommit=0?!
Good catch, fixed! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #14 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Sorry but can't reproduce, or don't know what to test. My test: Serials > New Subscription On subscription details filled some data in Manual history Call number Library: (select a library) Public note: Nonpublic note: Patron notification: Location: Grace period: Is that the data not loaded again? If yes, it works for me. If no, please provide a good test plan. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15030 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz Status|Needs Signoff |Failed QA --- Comment #15 from Liz Rea <liz@catalyst.net.nz> --- Hi, May we please have a comprehensive test plan, it seems there are cases where this bug doesn't manifest and can't be reproduced. Cheers, Liz -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org