[Bug 34943] New: Add a pre-save plugin hook for biblios
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Bug ID: 34943 Summary: Add a pre-save plugin hook for biblios Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org It would be handy if we could have a hook that is passed the MARC::Record to be saved (on ModBiblioMarc) right before saving it. This way we could add machine generated fields using plugins. -- 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=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com, 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=34943 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I forgot to mention, right now we have the 'after_biblio_action' hook, but using is for the aforementioned purpose would generate a loop. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- That sounds like an excellent idea! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- 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=34943 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 159680 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159680&action=edit Bug 34943: Unit tests -- 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=34943 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 159681 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159681&action=edit Bug 34943: Implement before_record_store() plugin hook This patch implements a hook allowing record modification right before they are written on the DB. The idea is that a plugin could be used to add machine-generated fields/subfields. To test: 1. Apply the unit tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t => FAIL: Tests fail! The hook is not implemented so the desired results don't appear (added fields/subfields). 3. Apply this patch 4. Repeat 2 => SUCCESS: It works! 5. Run: k$ qa -c 2 => SUCCESS: All green! 6. Sign off :-D Sponsored-by: Theke Solutions -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- 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=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159680|0 |1 is obsolete| | Attachment #159681|0 |1 is obsolete| | --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 159682 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159682&action=edit Bug 34943: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 159683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159683&action=edit Bug 34943: Implement before_record_store() plugin hook This patch implements a hook allowing record modification right before they are written on the DB. The idea is that a plugin could be used to add machine-generated fields/subfields. To test: 1. Apply the unit tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t => FAIL: Tests fail! The hook is not implemented so the desired results don't appear (added fields/subfields). 3. Apply this patch 4. Repeat 2 => SUCCESS: It works! 5. Run: k$ qa -c 2 => SUCCESS: All green! 6. Sign off :-D Sponsored-by: Theke Solutions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29392 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159682|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 159684 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159684&action=edit Bug 34943: Unit tests Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159683|0 |1 is obsolete| | --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 159685 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159685&action=edit Bug 34943: Implement before_record_store() plugin hook This patch implements a hook allowing record modification right before they are written on the DB. The idea is that a plugin could be used to add machine-generated fields/subfields. To test: 1. Apply the unit tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t => FAIL: Tests fail! The hook is not implemented so the desired results don't appear (added fields/subfields). 3. Apply this patch 4. Repeat 2 => SUCCESS: It works! 5. Run: k$ qa -c 2 => SUCCESS: All green! 6. Sign off :-D Sponsored-by: Theke Solutions Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- David, we overlapped. I'm renaming the hook for clarity. Let me re-submit and you test again! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159684|0 |1 is obsolete| | Attachment #159685|0 |1 is obsolete| | --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 159686 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159686&action=edit Bug 34943: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 159687 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159687&action=edit Bug 34943: Implement `before_biblio_metadata_store` plugin hook This patch implements a hook allowing record modification right before they are written on the DB. The idea is that a plugin could be used to add machine-generated fields/subfields. To test: 1. Apply the unit tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t => FAIL: Tests fail! The hook is not implemented so the desired results don't appear (added fields/subfields). 3. Apply this patch 4. Repeat 2 => SUCCESS: It works! 5. Run: k$ qa -c 2 => SUCCESS: All green! 6. Sign off :-D Sponsored-by: Theke Solutions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I decided to rename for hook for better scoping it (authorities could have a hook too) taking the idea from bug 29392, which feels valuable as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159686|0 |1 is obsolete| | --- Comment #13 from David Nind <david@davidnind.com> --- Created attachment 159690 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159690&action=edit Bug 34943: Unit tests Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159687|0 |1 is obsolete| | --- Comment #14 from David Nind <david@davidnind.com> --- Created attachment 159691 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159691&action=edit Bug 34943: Implement `before_biblio_metadata_store` plugin hook This patch implements a hook allowing record modification right before they are written on the DB. The idea is that a plugin could be used to add machine-generated fields/subfields. To test: 1. Apply the unit tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t => FAIL: Tests fail! The hook is not implemented so the desired results don't appear (added fields/subfields). 3. Apply this patch 4. Repeat 2 => SUCCESS: It works! 5. Run: k$ qa -c 2 => SUCCESS: All green! 6. Sign off :-D Sponsored-by: Theke Solutions Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20065 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This feels like the perfect place for a plugin hook to accomplish bug 20065 :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159690|0 |1 is obsolete| | --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161695 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161695&action=edit Bug 34943: Unit tests Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159691|0 |1 is obsolete| | --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161696 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161696&action=edit Bug 34943: Implement `before_biblio_metadata_store` plugin hook This patch implements a hook allowing record modification right before they are written on the DB. The idea is that a plugin could be used to add machine-generated fields/subfields. To test: 1. Apply the unit tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t => FAIL: Tests fail! The hook is not implemented so the desired results don't appear (added fields/subfields). 3. Apply this patch 4. Repeat 2 => SUCCESS: It works! 5. Run: k$ qa -c 2 => SUCCESS: All green! 6. Sign off :-D Sponsored-by: Theke Solutions Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works as described, fully tested and no regressions :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Actually.. reading a little deeper I have questions. Should we not be consistent with 'after_biblio_action' and call the hook 'before_biblio_action' and pass through an 'action' parameter? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #19)
Actually.. reading a little deeper I have questions.
Should we not be consistent with 'after_biblio_action' and call the hook 'before_biblio_action' and pass through an 'action' parameter?
You might be right. I had my own doubts about it :-D I will expose my thinking so we can discuss on top of it: let's think we move things to Koha::* I would imagine we implement: Koha::Biblio->update_from_marc Koha::Biblio->new_from_marc and let's stop at `update_from_marc` (at some point our MARC editor(s) could be replaced by a UI that PUTs application/marc-in-json, but right now we do HTML form -> MARC::Record -> ModBiblio which is conceptually the same). In plain english, the sequence of actions would be: 1. You got passed a MARC::Record, didn't do anything yet. 2. Some sanitization takes place (as in Koha::Biblio::Metadata->store or ModBiblio. 3. Some data is extracted and stored on biblio and biblioitems. 4. The sanitized metadata is stored. This hook is intended to be called between (3) and (4). I would accept any naming change, but need to be sure we are looking at the same thing. To me, `before_biblio_action` might fit before (3) but could as well fit before (2). Hope it clarifies the thinking behind of it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #21 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #19)
Actually.. reading a little deeper I have questions.
Should we not be consistent with 'after_biblio_action' and call the hook 'before_biblio_action' and pass through an 'action' parameter?
I think I misread this :-D Sending a follow-up patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 163048 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163048&action=edit Bug 34943: (QA follow-up) Use `before_biblio_action` and an `action` param This patch harmonizes the hook name and parameters with the rest of the codebase. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ qa => SUCCESS: All looks green, and tests still pass (i.e. they were correctly adjusted to the new schema). 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off --- Comment #23 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Martin, can you please check if my follow-up is what you were envisioning? Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #24 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Look good to me.. I'm still comparing to the _after_biblio_action_hooks sub though and the signature looks a little different with a top level hash vs a hash under a 'payload' key.. thoughts on that? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #25 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #24)
Look good to me.. I'm still comparing to the _after_biblio_action_hooks sub though and the signature looks a little different with a top level hash vs a hash under a 'payload' key.. thoughts on that?
Yeah, I looked at C4::Reserves and C4::Circulation hooks and found those were all following this pattern. I'm not attached to any pattern, but the one I picked seems to be used more. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #26 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Good catch, thanks for highlighting that Tomas. Oh the fun of trying to stay consistent when we're already rather inconsistent aye. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161695|0 |1 is obsolete| | --- Comment #27 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 163325 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163325&action=edit Bug 34943: Unit tests Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161696|0 |1 is obsolete| | --- Comment #28 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 163326 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163326&action=edit Bug 34943: Implement `before_biblio_metadata_store` plugin hook This patch implements a hook allowing record modification right before they are written on the DB. The idea is that a plugin could be used to add machine-generated fields/subfields. To test: 1. Apply the unit tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t => FAIL: Tests fail! The hook is not implemented so the desired results don't appear (added fields/subfields). 3. Apply this patch 4. Repeat 2 => SUCCESS: It works! 5. Run: k$ qa -c 2 => SUCCESS: All green! 6. Sign off :-D Sponsored-by: Theke Solutions Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163048|0 |1 is obsolete| | --- Comment #29 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 163327 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163327&action=edit Bug 34943: (QA follow-up) Use `before_biblio_action` and an `action` param This patch harmonizes the hook name and parameters with the rest of the codebase. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ qa => SUCCESS: All looks green, and tests still pass (i.e. they were correctly adjusted to the new schema). 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36343 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29392 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29392 [Bug 29392] Add plugin hooks before merging biblios or authorities -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply --- Comment #30 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Something going wrong here, can you please rebase? Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 34943: Unit tests Using index info to reconstruct a base tree... M t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t Falling back to patching base and 3-way merge... Auto-merging t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t Applying: Bug 34943: Implement `before_biblio_metadata_store` plugin hook Applying: Bug 34943: (QA follow-up) Use `before_biblio_action` and an `action` param error: sha1 information is lacking or useless (C4/Biblio.pm). error: could not build fake ancestor Patch failed at 0001 Bug 34943: (QA follow-up) Use `before_biblio_action` and an `action` param hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-34943-QA-follow-up-Use-beforebiblioaction-and--c2vv4mt2.patch Please also add to the release notes field and the wiki page for documentation: https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163325|0 |1 is obsolete| | Attachment #163326|0 |1 is obsolete| | Attachment #163327|0 |1 is obsolete| | --- Comment #31 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 163711 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163711&action=edit Bug 34943: Unit tests Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #32 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 163712 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163712&action=edit Bug 34943: Implement `before_biblio_metadata_store` plugin hook This patch implements a hook allowing record modification right before they are written on the DB. The idea is that a plugin could be used to add machine-generated fields/subfields. To test: 1. Apply the unit tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t => FAIL: Tests fail! The hook is not implemented so the desired results don't appear (added fields/subfields). 3. Apply this patch 4. Repeat 2 => SUCCESS: It works! 5. Run: k$ qa -c 2 => SUCCESS: All green! 6. Sign off :-D Sponsored-by: Theke Solutions Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #33 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 163713 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163713&action=edit Bug 34943: (QA follow-up) Use `before_biblio_action` and an `action` param This patch harmonizes the hook name and parameters with the rest of the codebase. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ qa => SUCCESS: All looks green, and tests still pass (i.e. they were correctly adjusted to the new schema). 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #34 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Please update the wiki page! https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |24.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #35 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28173 CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #36 from Frédéric Demians <frederic@tamil.fr> --- Backported (big word) to 22.11.x for 22.11.16 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31791 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31791 [Bug 31791] Add the ability to lock records to prevent modification through the Koha staff interface(s) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #37 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #34)
Please update the wiki page! https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks
*ping* -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 --- Comment #38 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Katrin Fischer from comment #37)
(In reply to Katrin Fischer from comment #34)
Please update the wiki page! https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks
*ping*
Done -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #39 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Martin Renvoize from comment #38)
(In reply to Katrin Fischer from comment #37)
(In reply to Katrin Fischer from comment #34)
Please update the wiki page! https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks
*ping*
Done
Thx! Also removed additional_work_needed now :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #40 from Fridolin Somers <fridolin.somers@biblibre.com> --- Not backported to 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This plugin hook allows release notes| |tweaking bibliographic | |records right before they | |are stored on the database. | | | |This allows having plugins | |that add custom/calculated | |fields, for example. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|martin.renvoize@ptfs-europe | |.com | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org