[Koha-bugs] [Bug 3150] Move emails for sending cart and list contents into notices tool

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Dec 17 10:59:51 CET 2020


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

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jonathan.druart at bugs.koha-c
                   |                            |ommunity.org

--- Comment #12 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Hello Aleisha,

This is a very interesting part to move to the notice templates!

However I am expecting it to be tricky, as you saw already :)

Before starting to implement anything I would suggest you to come with a plan.
I can provide you early feedback to see if we are starting with the best
solution.

In my opinion we should only pass Koha::Objects-based variables to the
template. Reusing the existing variables will make us start with obsolete code
(it will be harder to improve it in the future as the libraries will have this
TT code in their templates).

(In reply to Katrin Fischer from comment #11)
> Could we imagine replacing the old subroutines by a more generic approach of
> accessing the information in the MARC record instead of moving them? 
> 
> Thinking of something like:
> 
> [% record.245a %]

Says we are talking about GetMarcUrls, it could be something like:
[% SET marc_record = biblio.metadata.record %]
[% FOR f IN marc_record.field('856') %]
  [%# Then do something for every 856 field
[% END %]

But then you are going to rewrite the code that is in a subroutine to a TT
syntax, that will be copy/pasted in different places.
And it's not what we want, it's too error prone (no test coverage, dup of
code).

The only long term and viable solution is to move them to the Koha namespace.
Have the Get* subroutines moved to Koha::Biblio methods, have the test
coverage, replace the existing occurrences, and finally reuse them from the
template notices.
But this task is huge...

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list