[Bug 42501] New: ILL: The language of requests send to partners should be the preferred language used by libraries, not by patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42501 Bug ID: 42501 Summary: ILL: The language of requests send to partners should be the preferred language used by libraries, not by patrons Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: ILL Assignee: koha-bugs@lists.koha-community.org Reporter: piia.semenoff@ouka.fi QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com, pedro.amorim@openfifth.co.uk, tomascohen@gmail.com When sending a ILL-request to another library (in the ILL requests-module) the language of the request-email is formed from patrons preferred language and not by preferred language used by the partner library. I think it would be easier if it would work like this: If you order an inter library loan from a Finnish university library for an English-speaking patron, the base of the ILL_PARTNER_REQ -notice to the library would be in Finnish, according to the preferred language of the Finnish university library. The request would not be using the language used by the patron. Would it be possible to use partner library's preferred language in the ILL_PARTNER_REQ -notices (and not patrons)? -- 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=42501 Inkeri Hakulinen <inkeri.hakulinen+bugz@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |inkeri.hakulinen+bugz@helsi | |nki.fi --- Comment #1 from Inkeri Hakulinen <inkeri.hakulinen+bugz@helsinki.fi> --- Yes, this would be very important! Now it seems that the order email appears to the message box before you even select the partner library. We usually order interlibrary loans to our Finnish and Swedish speaking customers from abroad, usually communicating in English with them. -- 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=42501 Slava Shishkin <slavashishkin@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |slavashishkin@gmail.com Assignee|koha-bugs@lists.koha-commun |slavashishkin@gmail.com |ity.org | -- 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=42501 Slava Shishkin <slavashishkin@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42501 --- Comment #2 from Slava Shishkin <slavashishkin@gmail.com> --- Created attachment 211480 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211480&action=edit Bug 42501: Use partner language for ILL request emails Use the partner's notice language instead of the requesting patron's. Show editable drafts after partner selection and preserve edits when switching partners. Keep one draft per language and the standard fallback. Manual test plan: 1. Enable ILLModule and TranslateNotices. Make two notice languages available. 2. Configure ILLPartnerCode and create two partners in that category with test email addresses and different preferred languages for notices. 3. Give ILL_PARTNER_REQ email templates distinct subjects and bodies for both languages and for Default. 4. Create a Standard ILL request for a patron whose notice language differs from one of the partners. 5. Before applying the patch, open Place request with partners. The draft uses the requesting patron's language and does not change with partners. 6. Apply the patch and reload the Perl code and browser assets. 7. Reopen the form: no draft is displayed until a partner is selected. Select each partner and check that its language's draft appears. 8. Edit a draft, switch to the other language and back, and check that the edits remain. 9. Select both partners: both language drafts should be editable. Using a local mail catcher, send and inspect each queued email's recipient, subject and content, including manual edits. 10. Check a partner without a language, and one whose language has no translated template: the existing Default fallback should be used. Assisted-by: Codex (OpenAI) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42501 --- Comment #3 from Andrii Nugged <nugged@gmail.com> --- Created attachment 211491 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211491&action=edit Bug 42501: Cover partner-language drafts and queued notices Update the existing generic-confirm assertion for the per-language draft structure and make its partner languages explicit. Exercise translated and default drafts, missing translations, disabled notice translations, preserved patron-language behavior for other callers, edited subjects and bodies, and selected recipients using real notice templates and transactional message-queue records. Automated tests: prove -I. -It/lib t/db_dependent/Koha/ILL/Requests.t \ t/db_dependent/Koha/ILL/PartnerLanguages.t Co-Authored-By: Loontik <loontik@nugged.team> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42501 --- Comment #4 from Andrii Nugged <nugged@gmail.com> --- Created attachment 211495 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211495&action=edit Bug 42501: Make the partner notice test self-contained Create the ILL_PARTNER_REQ template inside the test transaction and use the same library for the request and template. Disable independent branches so the assertion does not depend on pre-existing templates or the current staff library. Automated tests: prove -I. -It/lib t/db_dependent/Koha/ILL/Requests.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42501 --- Comment #5 from Andrii Nugged <nugged@gmail.com> --- Created attachment 211496 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211496&action=edit Bug 42501: Prepare all partner emails before queueing Queueing while preparing the selected partners can leave the first email pending when a later language has a missing or blank draft or notice template. The request reports failure despite that queued email. Prepare all selected letters first. Return the normal browser error before any queue write if a recipient, template, subject or message is unusable. Keep the existing language drafts and edited text. Suppress the misleading "No partners have been defined yet" message on failure. Regression tests cover missing and whitespace-only fields, a missing notice, a notice preparation exception and a missing recipient after a valid partner. Each must return an error, queue nothing and leave the request status unchanged. Test plan: Use a test system with outgoing email disabled. Apply the earlier patches on this bug. Enable ILLModule and TranslateNotices. Have two ILL partner patrons with email addresses and different preferred notice languages, and an ILL_PARTNER_REQ email template for each language. The staff library must have an email address. Before applying the patch: 1. Open a new ILL request in Interlibrary loans. 2. Click "Place request with partners". 3. Select both partner libraries. 4. Replace the second language's "Email text" with spaces only. 5. Click "Send email". An "Email queueing failed" error appears. 6. Open the first partner's patron record, then "Notices". Its email has nevertheless been queued with status "pending". Apply the patch. After applying the patch: 1. Repeat steps 1-5 with a fresh new request. The error now says no emails have been queued. 2. Check both partners' "Notices". Neither has an additional email. 3. Open "Place request with partners" again for the new request. 4. Select both partners and enter a nonblank subject and text for each. 5. Deselect and reselect one partner. Its edited text is preserved. 6. Click "Send email". The request is "Requested from partners". 7. Check both partners' "Notices". Each has one new pending email with its own language's edited subject and text. Automated tests: prove -I. -It/lib t/db_dependent/Koha/ILL/PartnerLanguages.t prove -I. -It/lib t/db_dependent/Koha/ILL/Requests.t Co-Authored-By: Loontik <loontik@nugged.team> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org