[Bug 24589] New: Add plugin hook addbiblio_check_record
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24589 Bug ID: 24589 Summary: Add plugin hook addbiblio_check_record Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: pasi.kallinen@koha-suomi.fi QA Contact: testopia@bugs.koha-community.org Adds a new plugin hook, addbiblio_check_record, to addbiblio.pl. When saving a record, the hook is called with the MARC record as a parameter. If the hook returns anything, the return values are shown to the user, and saving the record is prevented. This can be used to create plugins that eg. check or modify the record. -- 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=24589 paxed <pasi.kallinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |pasi.kallinen@koha-suomi.fi |ity.org | --- Comment #1 from paxed <pasi.kallinen@koha-suomi.fi> --- Created attachment 98429 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98429&action=edit Add plugin hook addbiblio_check_record Adds a new plugin hook, addbiblio_check_record, to addbiblio.pl. When saving a record, the hook is called with the MARC record as a parameter. If the hook returns anything, the return values are shown to the user, and saving the record is prevented. This can be used to create plugins that eg. check or modify the record. Advanced editor has not been changed. -- 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=24589 --- Comment #2 from paxed <pasi.kallinen@koha-suomi.fi> --- Created attachment 98447 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98447&action=edit Plugin to test Bug 24589 This is a Koha plugin used to test Bug 24589 functionality. Test plan: 1) Go to cataloging > New record 2) Edit the record, and save it. 3) Enable plugins, upload this plugin, and enable it. 4) Go to cataloging > New record 5) Edit the record, fill the required fields. Make sure 245$a does not contain "FOOBAR". 6) Try to save the record, you'll get a complaint: "ERROR: 245$a was not FOOBAR. Try saving again." 6) Check field 245$a, it should now contain "FOOBAR" 7) Try saving the record, it should now work normally. 8) Disable this plugin, and repeat 1 & 2 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24589 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24589 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #3 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Hi, works Ok, just fix the following QA error: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt FAIL filters missing_filter at line 694 ( <li>[% MARC_ERR %]</li>) For example: [% MARC_ERR | html %] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24589 paxed <pasi.kallinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98429|0 |1 is obsolete| | --- Comment #4 from paxed <pasi.kallinen@koha-suomi.fi> --- Created attachment 99976 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99976&action=edit Bug 24589: Add plugin hook addbiblio_check_record Adds a new plugin hook, addbiblio_check_record, to addbiblio.pl. When saving a record, the hook is called with the MARC record as a parameter. If the hook returns anything, the return values are shown to the user, and saving the record is prevented. This can be used to create plugins that eg. check or modify the record. Advanced editor has not been changed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24589 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Needs Signoff |Failed QA --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- Bug 20145 removed preference 'UseKohaPlugins', please remove it from your patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24589 --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Bug 20415 removed preference 'UseKohaPlugins', please remove it from your patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24589 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #7 from David Cook <dcook@prosentient.com.au> --- Ohhh I like the sound of this. This could be an interesting way to add checks for authority linking... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24589 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |severine.queune@bulac.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24589 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- Actually, it might be nicer just to have a plugin hook that is fired when a bib is created, modified, or deleted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24589 --- Comment #9 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #8)
Actually, it might be nicer just to have a plugin hook that is fired when a bib is created, modified, or deleted.
Oh never mind me. That is Bug 22709. I'll see myself out. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24589 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24589 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com --- Comment #10 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Oh, to bad this hook is only linked to "add" operation, it would be very useful to check a record upon modification as well! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org