We found that notices were going out containing raw <<borrowers.field>>. I narrowed it down to the fact we store the new patron object but don't then discard changes to get the autoincremented new borrowernumber so we were sending blank ID's to GePreparedLetter. This lead me to spot the same issue in a few other locations in the script too.
Created attachment 144732 [details] [review] Bug 32501: Consistently refer to borrowernumber We had a mixture of $patron->borrowernumber, $patron->id and $borrowernumber. This patch updates the occurences of $patron->borrowernumber to just refer to $borrowernumber which is set correctly throughout the script. Test plan 1) For newly created borrowers on import check that the produced welcome notice correctly fills the borrower details from the template. 2) For updated borrowers in the import, check that the debartments still work as expected.
Hmm... writing a unit test for this appears to prove I'm wrong :(
Any update on this?