https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943

--- Comment #20 from Tomás Cohen Arazi <tomasco...@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.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to