[Koha-bugs] [Bug 34842] t/db_dependent/Illrequest/Config.t is failing if the DB has been upgraded

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Sep 25 17:44:31 CEST 2023


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

--- Comment #4 from Pedro Amorim <pedro.amorim at ptfs-europe.com> ---
(In reply to Jonathan Druart from comment #1)
> Hum, I don't understand. Is the config still exists or not?
> Is the syspref only a fallback??
> 
> * is($config->partner_code, "IL", "partner_code: Undefined partner_code is
> undefined.");
> 
> Then it's not undefined!
> 
> * Koha/Illrequest/Config.pm
> 258         partner_code       => 'IL',
> then...
> 322     $configuration->{partner_code} =
> C4::Context->preference('ILLPartnerCode') || 'IL';
> 
> Please clarify!

Hey!

k-t-d has <partner_code>ILLLIBS</partner_code> in
/etc/koha/sites/kohadev/koha-conf.xml.

To preserve functionality, the upgrade takes whatever already exists in
koha-conf.xml and sets that to the new system preference ILLPartnerCode.

We don't need to worry about multiple upgrade because of INSERT IGNORE, i.e.
it'll only read from the koha-conf.xml and put it in the database the first
time.

For clean-up, we could consider removing <partner_code> from koha-conf.xml
after the upgrade has ran successfully, but it even if it's there - it's not
being used anymore.

I'm not sure about the change to Config.pm, see bug 21548.

The fixes in the tests look good, I missed mocking the preference.

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


More information about the Koha-bugs mailing list