[Bug 12884] New: Get rid of redefined subroutine warnings from dateaccessioned.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 Bug ID: 12884 Summary: Get rid of redefined subroutine warnings from dateaccessioned.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Most value_builder scripts have use warnings commented since they redefine subroutines like plugin_javascript etc. and they would create a lot of loglines. The dateaccessioned script in this folder does not have it commented; so it creates loglines. While we wait for the real solution for those redefines, I am at least consistent when commenting the use warnings here.. ;) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 --- Comment #1 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 31452 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31452&action=edit Bug 128840: Get rid of redefined subroutine warnings in dateaccessioned.pl Most value_builder scripts have use warnings commented since they redefine subroutines like plugin_javascript etc. and they would create a lot of loglines. The dateaccessioned script in this folder does not have it commented; so it creates loglines. While we wait for the real solution for those redefines, I am at least consistent when commenting the use warnings here.. ;) Test plan: Edit an item. Check log. Apply patch. Edit an item. Check log. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31452|0 |1 is obsolete| | --- Comment #2 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 31453 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31453&action=edit Bug 12884: Get rid of redefined subroutine warnings in dateaccessioned.pl Most value_builder scripts have use warnings commented since they redefine subroutines like plugin_javascript etc. and they would create a lot of loglines. The dateaccessioned script in this folder does not have it commented; so it creates loglines. While we wait for the real solution for those redefines, I am at least consistent when commenting the use warnings here.. ;) Test plan: Edit an item. Check log. Apply patch. Edit an item. Check log. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- I don't see any errors in my log related to dateaccessioned.pl. What steps should I take to reproduce this problem? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 --- Comment #4 from Marc Véron <veron@veron.ch> --- Created attachment 31578 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31578&action=edit [Signed-off] Bug 12884: Get rid of redefined subroutine warnings in dateaccessioned.pl Most value_builder scripts have use warnings commented since they redefine subroutines like plugin_javascript etc. and they would create a lot of loglines. The dateaccessioned script in this folder does not have it commented; so it creates loglines. While we wait for the real solution for those redefines, I am at least consistent when commenting the use warnings here.. ;) Test plan: Edit an item. Check log. Apply patch. Edit an item. Check log. Without patch I got warnings in intranet-error.log. With patch no more warnings occured. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31453|0 |1 is obsolete| | CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 --- Comment #5 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Owen Leonard from comment #3)
I don't see any errors in my log related to dateaccessioned.pl. What steps should I take to reproduce this problem?
This has to do with the order in which the plugins are defined/redefined. Create an item with a subfield d (dateaccessioned) and p (barcode). Verify that both are connected to a plugin (should be by default). If d and p are the only ones loaded and d goes before p, you will have no warnings. The order of plugin definition depends on additem line 771: foreach my $subfield ( $field->subfields() ) So it depends on MARC::Field; the internal _subfields in MARC::Field seems not to be sorted; new subfields are added at the end. An easy way to force this problem, is add a sort at line 771: foreach my $subfield ( sort { $a->[0] lt $b->[0] } $field->subfields() ) In my simple test case p now goes before d and you should have warnings. Note that I had the errors by default in 3.14 and not in master. But it just depends on circumstances, data etc. If you add a plugin before d, you could probably force it too. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31578|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31632 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31632&action=edit [ALT] Bug 12884: Get rid of redefined subroutine warnings in dateaccessioned.pl Instead of removing all warnings, we should remove warnings about the redefined subroutines. Test plan: - link the dateaccessioned plugin with one of your biblio field - edit an item - verify they are no warnings in the Koha log file. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31578|1 |0 is obsolete| | CC| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- Marcel, could you have a look at my alternative patch please? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31578|0 |1 is obsolete| | Attachment #31632|0 |1 is obsolete| | --- Comment #8 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 31636 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31636&action=edit Bug 12884: Get rid of redefined subroutine warnings in dateaccessioned.pl Instead of removing all warnings, we should remove warnings about the redefined subroutines. Test plan: - link the dateaccessioned plugin with one of your biblio field - edit an item - verify they are no warnings in the Koha log file. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #9 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- This works fine too, Jonathan. Taking the liberty to promote this directly to Passed QA now. We spent enough time on this trivial one. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|m.de.rooy@rijksmuseum.nl |jonathan.druart@biblibre.co | |m QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to M. de Rooy from comment #9)
This works fine too, Jonathan. Taking the liberty to promote this directly to Passed QA now. We spent enough time on this trivial one.
Aren't we just hiding a problem? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 --- Comment #11 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Tomás Cohen Arazi from comment #10)
(In reply to M. de Rooy from comment #9)
This works fine too, Jonathan. Taking the liberty to promote this directly to Passed QA now. We spent enough time on this trivial one.
Aren't we just hiding a problem?
Problem is a big word. But yes, we are hiding the warnings just as all other value builder scripts do. It should be/have been designed differently. BTW I tried something on bug 10480 with a global variable. But I was not satisfied with it. What perhaps made it more complex, was the gradual approach: keep the old way alive, while introducing the new way. Will still think about something else, but I do not object to this patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12884 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org