[Bug 13635] New: $record->title is called even if marc flavour is UNIMARC
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Bug ID: 13635 Summary: $record->title is called even if marc flavour is UNIMARC Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: gmcharlt@gmail.com Reporter: jonathan.druart@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl The title method of MARC::Record does not deal with UNIMARC, it should not be called if the marc flavour is UNIMARC. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |jonathan.druart@biblibre.co | |m Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 35575 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35575&action=edit Bug 13635: Unimarc - On editing a notice, the title should be displayed The title method of MARC::Record does not deal with UNIMARC, it should not be called if the marc flavour is UNIMARC. Test plan: On an unimarc installation, edit a notice, with this patch you should see "Editing TITLE (Record number BIBLIONUMBER)" Without, the title was not displayed. Same in the breadcrumbs. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 35576 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35576&action=edit Bug 13635: Remove another useless call There is another call to the title method in additem.pl without any check on the marc flavour. But here the title variable sent to the template is redefined 3 lines later. So it can be simply removed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com Status|Needs Signoff |Failed QA --- Comment #3 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Hi Jonathan, Seems that 'usmarc' is not a valid value for 'marcflavour' syspref, only MARC21, UNIMARC and NORMARC And the same error is on line 916 of addbiblio.pl Perhaps is better to write the code as: if ( $record ne "-1" ) { if ( C4::Context->preference('marcflavour') =~/unimarc/i ) { $template->param( title => $record->subfield('200',"a") ); } else { $template->param( title => $record->title() ); } } ... unless I'm mistaken. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35575|0 |1 is obsolete| | Attachment #35576|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 36502 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36502&action=edit Bug 13635: Unimarc - On editing a notice, the title should be displayed The title method of MARC::Record does not deal with UNIMARC, it should not be called if the marc flavour is UNIMARC. Test plan: On an unimarc installation, edit a notice, with this patch you should see "Editing TITLE (Record number BIBLIONUMBER)" Without, the title was not displayed. Same in the breadcrumbs. Bug 13635: Remove another useless call There is another call to the title method in additem.pl without any check on the marc flavour. But here the title variable sent to the template is redefined 3 lines later. So it can be simply removed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Bernardo Gonzalez Kriegel from comment #3)
Hi Jonathan, Seems that 'usmarc' is not a valid value for 'marcflavour' syspref, only MARC21, UNIMARC and NORMARC
And the same error is on line 916 of addbiblio.pl
Perhaps is better to write the code as:
if ( $record ne "-1" ) { if ( C4::Context->preference('marcflavour') =~/unimarc/i ) { $template->param( title => $record->subfield('200',"a") ); } else { $template->param( title => $record->title() ); } }
... unless I'm mistaken.
Yes of course, you are right! Now patch attached. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36502|0 |1 is obsolete| | --- Comment #6 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 36507 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36507&action=edit [SIGNED-OFF] Bug 13635: Unimarc - On editing a notice, the title should be displayed The title method of MARC::Record does not deal with UNIMARC, it should not be called if the marc flavour is UNIMARC. Test plan: On an unimarc installation, edit a notice, with this patch you should see "Editing TITLE (Record number BIBLIONUMBER)" Without, the title was not displayed. Same in the breadcrumbs. Bug 13635: Remove another useless call There is another call to the title method in additem.pl without any check on the marc flavour. But here the title variable sent to the template is redefined 3 lines later. So it can be simply removed. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Tested on UNIMARC install, editing a 'record' (not notice) does not show title on breadcrumbs, status bar or page title. With patch it does! No koha-qa errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> 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=13635 aloij <aloi54@live.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aloi54@live.fr --- Comment #7 from aloij <aloi54@live.fr> --- Tested on UNIMARC install the title is displayed correctly in the instructions with this patch signed-off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 --- Comment #8 from aloij <aloi54@live.fr> --- (In reply to aloij from comment #7)
Tested on UNIMARC install the title is displayed correctly in the "edit record" with this patch signed-off
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sandboxes@biblibre.com --- Comment #9 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Patch tested with a sandbox, by joel aloi <aloi54@live.fr> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36507|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 --- Comment #10 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 36575 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36575&action=edit Bug 13635: Unimarc - On editing a notice, the title should be displayed The title method of MARC::Record does not deal with UNIMARC, it should not be called if the marc flavour is UNIMARC. Test plan: On an unimarc installation, edit a notice, with this patch you should see "Editing TITLE (Record number BIBLIONUMBER)" Without, the title was not displayed. Same in the breadcrumbs. Bug 13635: Remove another useless call There is another call to the title method in additem.pl without any check on the marc flavour. But here the title variable sent to the template is redefined 3 lines later. So it can be simply removed. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Tested on UNIMARC install, editing a 'record' (not notice) does not show title on breadcrumbs, status bar or page title. With patch it does! No koha-qa errors. Signed-off-by: joel aloi <aloi54@live.fr> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36575|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 36607 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36607&action=edit [PASSED QA] Bug 13635: Unimarc - On editing a notice, the title should be displayed The title method of MARC::Record does not deal with UNIMARC, it should not be called if the marc flavour is UNIMARC. Test plan: On an unimarc installation, edit a notice, with this patch you should see "Editing TITLE (Record number BIBLIONUMBER)" Without, the title was not displayed. Same in the breadcrumbs. Bug 13635: Remove another useless call There is another call to the title method in additem.pl without any check on the marc flavour. But here the title variable sent to the template is redefined 3 lines later. So it can be simply removed. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Tested on UNIMARC install, editing a 'record' (not notice) does not show title on breadcrumbs, status bar or page title. With patch it does! No koha-qa errors. Signed-off-by: joel aloi <aloi54@live.fr> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #13 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x will be in 3.18.5 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #14 from Mason James <mtj@kohaaloha.com> --- Pushed to 3.16.x, will be in 3.16.9 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13635 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@enger.priv.no --- Comment #15 from Jonathan Druart <jonathan.druart@biblibre.com> --- *** Bug 10975 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org