[Koha-bugs] [Bug 12532] Redirect guarantee email to guarantor

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Apr 6 21:12:23 CEST 2023


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

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA

--- Comment #97 from David Nind <david at davidnind.com> ---
I have tested (using koha-testing-docker), so that there is a sign-off from
someone other than InLibro staff.

It works, but I've failed QA because of the things under 'Notes from testing' -
hopefully, once these are fixed the QA process should be easier!

Test plan notes:
1. Add a guarantor to a patron (I added Mary Burton (23529000651225) as a
guarantor to Lisa Charles (23529000197047)).
2. For each of the patrons:
   - Add an email address (I used two different email addresses)
   - Update the 'Patron messaging preferences' section so that an email is sent
for item checkouts
3. To check the notices sent: [patron account] > Notices (can also check the
database: koha-mysql kohadev the select * from message_queue;)
4. To run tests: prove t/db_dependent/Members.t and prove
t/db_dependent/Letters.t
5. To test sending emails using a Google account, edit the
/etc/koha/sites/kohadev/koha-conf.xml file and add this configuration near the
end (where <user_name> = your Google email address; <password> = your APP
password, not your Google account password - see Google Help on how to set up
an app password):

   <smtp_server>
      <host>smtp.gmail.com</host>
      <port>587</port>
      <timeout>5</timeout>
      <ssl_mode>STARTTLS</ssl_mode>
      <user_name>GOOGLEACCOUNTUSER</user_name>
      <password>GOOGLEAPPPASSWORD</password>
      <debug>1</debug>
   </smtp_server>

Notes from testing:

1. There are whitespace errors when applying the patches. [1]

2. Formatting patch titles - these should be in the format Bug XXXX: The title
for the patch AND Bug XXXX: (follow-up) The title for the follow-up (see
https://wiki.koha-community.org/wiki/Commit_messages#Subject_line).

3. Patches with the same name - this can be confusing, but I'm not sure of the
best way to do this for this bug. Also, as this bug has been around for a
while, and has a bit of history, maybe the patches should be consolidated. I
would ask on IRC to get expert advice on the best approach to take for this bug
(maybe have the main patch, a patch for the database update, and a patch for
test changes).

4. Running updatedatabase produced no output on the command line for me -
normally it does. The way to do database updates changed a while ago, but I
don't know enough about how this works to comment. Maybe ask on IRC or see
https://wiki.koha-community.org/wiki/Database_updates However, the new system
preference RedirectGuaranteeEmail appears for me.

5. Running the tests fail for: prove t/db_dependent/Members.t and prove
t/db_dependent/Letters.t [2]

6. Comment #70 - not sure whether any of the issues raised have been addressed,
or whether these should be addressed in a separate bug.

[1] Applying the patch - whitespace error:

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 12532 - Send emails to guarantee and guarantor
.git/rebase-apply/patch:35: trailing whitespace.
        unless ($to_address) {  
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
M       C4/Letters.pm
M       Koha/Patron.pm
M       installer/data/mysql/mandatory/sysprefs.sql
M       koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
M       t/db_dependent/Members.t
.git/rebase-apply/patch:35: trailing whitespace.
        unless ($to_address) {  
warning: 1 line adds whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging t/db_dependent/Members.t
Auto-merging
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
Auto-merging installer/data/mysql/mandatory/sysprefs.sql
Auto-merging Koha/Patron.pm
Auto-merging C4/Letters.pm
Applying: Bug 12532 - (follow-up) clean up
Applying: Bug 12532 - Correction of tests involving guarantorid
Applying: Bug 12532: Send email to guarantee and guarantor;

[2] Test output:

prove t/db_dependent/Members.t
t/db_dependent/Members.t .. 53/53 # Looks like you planned 53 tests but ran 57.
t/db_dependent/Members.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
All 53 subtests passed 

Test Summary Report
-------------------
t/db_dependent/Members.t (Wstat: 65280 Tests: 57 Failed: 4)
  Failed tests:  54-57
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 53 tests but ran 57.
Files=1, Tests=57,  2 wallclock secs ( 0.02 usr  0.01 sys +  1.77 cusr  0.42
csys =  2.22 CPU)
Result: FAIL


prove t/db_dependent/Letters.t
t/db_dependent/Letters.t .. 48/87 
    #   Failed test 'SendAlerts is using the mocked send_or_die routine
(claimissues)'
    #   at t/db_dependent/Letters.t line 854.
    # didn't find a warning
    # expected to find warning: (?^u:Fake send_or_die)
    # Looks like you planned 14 tests but ran 2.
    # Looks like you failed 1 test of 2 run.

#   Failed test 'Test SMS handling in SendQueuedMessages'
#   at t/db_dependent/Letters.t line 923.
Can't call method "letter_id" on an undefined value at t/db_dependent/Letters.t
line 862.
# Looks like your test exited with 11 just after 83.
t/db_dependent/Letters.t .. Dubious, test returned 11 (wstat 2816, 0xb00)
Failed 5/87 subtests 

Test Summary Report
-------------------
t/db_dependent/Letters.t (Wstat: 2816 Tests: 83 Failed: 1)
  Failed test:  83
  Non-zero exit status: 11
  Parse errors: Bad plan.  You planned 87 tests but ran 83.
Files=1, Tests=83,  2 wallclock secs ( 0.02 usr  0.00 sys +  1.74 cusr  0.34
csys =  2.10 CPU)
Result: FAIL

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


More information about the Koha-bugs mailing list