INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','OFF','Defines the default email address where \'Account Details\' emails are sent.','email|emailpro|B_email|cardnumber|OFF','Choice'); This preference should be set to one of the choices - and OFF shouldn't be a choice - OFF seems to map to 'alternate'
Also, doesn't first_valid make the most sense as the default value since it's the most broad?
Hi Nicole, I checked this bug and it seems that OFF is mapping to 'first valid' which makes the default setting like you wanted it :) - - "Use" - pref: AutoEmailPrimaryAddress default: "OFF" choices: email: home emailpro: work B_email: alternate "OFF": first valid - "patron email address for sending out emails." - This also matches the code: 909 if ($which_address eq 'OFF') { 910 $to_address = GetFirstValidEmailAddress( $message->{'borrowernumber'} ); But there is one option 'cardnumber' that is not reflected in the pref file and can not be selected. I am going to add it. INSERT INTO `systempreferences` VALUES ('AutoEmailPrimaryAddress','OFF','email|emailpro|B_email|cardnumber|OFF','Defines the default email address where Account Details emails are sent.','Choice')"
Created attachment 9130 [details] [review] Bug 7371: Add 'cardnumber' as option for AutoEmailPrimaryAddress The systempref.sql file had one more option 'cardnumber' that was not visible from the system preference editor. This patch adds the setting. To test: - Check new setting cardnumber is available for AutoEmailPrimaryAddress - Use setting with a patron that has an email address as cardnumber and verify email is sent out correctly.
Created attachment 9162 [details] [review] Bug 7371: Add 'cardnumber' as option for AutoEmailPrimaryAddress The systempref.sql file had one more option 'cardnumber' that was not visible from the system preference editor. This patch adds the setting. To test: - Check new setting cardnumber is available for AutoEmailPrimaryAddress - Use setting with a patron that has an email address as cardnumber and verify email is sent out correctly. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Safely adds 'cardnumber' option to syspref editor. Marking Passed QA.
There have been no further reports of problems so I am marking this bug resolved.