Bug 28582

Summary: Can't enqueue letter HASH(0x55edf1806850) at /usr/share/koha/Koha/ArticleRequest.pm line 123.
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: NoticesAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, kyle, martin.renvoize, victor
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.02,20.11.08
Attachments: Bug 28582: Fix hashref in a warning message
Bug 28582: Fix hashref in a warning message

Description Marcel de Rooy 2021-06-17 09:33:12 UTC
C4::Letters::EnqueueLetter(
            {
                letter                 => $letter,
                borrowernumber         => $self->borrowernumber,
                message_transport_type => 'email',
            }
        ) or warn "can't enqueue letter $letter";
Comment 1 Marcel de Rooy 2021-06-17 09:41:05 UTC
Created attachment 122058 [details] [review]
Bug 28582: Fix hashref in a warning message

Can't enqueue letter HASH(0x55edf1806850)

Test plan:
If you cancel an article request when there is no email address
(no branch email, no KohaAdminEmailAddress), Koha warns.
Verify that the warning now contains the letter code.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2021-06-17 09:41:27 UTC
Self signoff: trivial++
Comment 3 Martin Renvoize 2021-06-17 11:24:02 UTC
Created attachment 122060 [details] [review]
Bug 28582: Fix hashref in a warning message

Can't enqueue letter HASH(0x55edf1806850)

Test plan:
If you cancel an article request when there is no email address
(no branch email, no KohaAdminEmailAddress), Koha warns.
Verify that the warning now contains the letter code.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2021-06-17 11:24:49 UTC
Works perfectly :). Passing QA

I feel like there's a pattern here begging to be adopted for the rest of the 'EnqueueLetter' calls.. but that can wait for another bug.
Comment 5 Jonathan Druart 2021-06-21 10:07:00 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 6 Kyle M Hall 2021-07-02 13:08:23 UTC
Pushed to 21.05.x for 21.05.02
Comment 7 Fridolin Somers 2021-07-10 02:50:07 UTC
Pushed to 20.11.x for 20.11.08
Comment 8 Victor Grousset/tuxayo 2021-07-11 02:34:01 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.