[Bug 37216] New: Fix dbrev for EmailFieldSelection
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Bug ID: 37216 Summary: Fix dbrev for EmailFieldSelection Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: emily.lamancusa@montgomerycountymd.gov Reporter: emily.lamancusa@montgomerycountymd.gov QA Contact: testopia@bugs.koha-community.org Depends on: 12802 The values for the "value" column and the "options" column are swapped in the SQL that added the EmailFieldSelection syspref (for both upgrades and new installations). I'm not sure if this causes any problems except in the situation where the user sets EmailFieldPrimary to MULTIPLE but doesn't set EmailFieldSelection (which doesn't make sense to do), but we should fix it anyway. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12802 [Bug 12802] Send notices using several email addresses -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 --- Comment #1 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 168218 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168218&action=edit Bug 37216: Fix SQL for EmailFieldSelection Test plan: Part A: New installation 1. Start a fresh test instance 2. Set EmailFieldPrimary to "selected addresses", and do not touch EmailFieldSelection 3. Edit a patron to ensure the following fields are set: - Primary email - Secondary email - Alternate email - Enable email notices for item checkout 4. Attempt to check an item out to that patron --> Koha explodes! 5. Apply patch 6. reset_all 7. Repeat steps 2-4 --> Checkout succeeds! 8. Ensure test plan for bug 12802 still passes Part B: Upgraded installation 1. Start a fresh test instance at version 23.11 2. Switch to main 3. Install database update 4. Set EmailFieldPrimary to "selected addresses", and do not touch EmailFieldSelection 5. Edit a patron to ensure the following fields are set: - Primary email - Secondary email - Alternate email - Enable email notices for item checkout 6. Attempt to check an item out to that patron --> Koha explodes! 7. Go back to 23.11 and reset_all 8. Switch to main and apply patch 9. Repeat steps 4-6 --> Checkout succeeds! 10. Ensure test plan for bug 12802 still passes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=37216 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168218|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 168230 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168230&action=edit Bug 37216: Fix SQL for EmailFieldSelection Test plan: Part A: New installation 1. Start a fresh test instance 2. Set EmailFieldPrimary to "selected addresses", and do not touch EmailFieldSelection 3. Edit a patron to ensure the following fields are set: - Primary email - Secondary email - Alternate email - Enable email notices for item checkout 4. Attempt to check an item out to that patron --> Koha explodes! 5. Apply patch 6. reset_all 7. Repeat steps 2-4 --> Checkout succeeds! 8. Ensure test plan for bug 12802 still passes Part B: Upgraded installation 1. Start a fresh test instance at version 23.11 2. Switch to main 3. Install database update 4. Set EmailFieldPrimary to "selected addresses", and do not touch EmailFieldSelection 5. Edit a patron to ensure the following fields are set: - Primary email - Secondary email - Alternate email - Enable email notices for item checkout 6. Attempt to check an item out to that patron --> Koha explodes! 7. Go back to 23.11 and reset_all 8. Switch to main and apply patch 9. Repeat steps 4-6 --> Checkout succeeds! 10. Ensure test plan for bug 12802 still passes Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. For Part B step 3, I also ran a yarn build and restart_all. 2. For Part B step 9, I repeated steps 3-6 (I think you need to run the database updates?), I also ran a yarn build and restart_all. 3. For step 10, see the consolidated test plan below for bug 12802 - Send notices using several email addresses. 12802 - Test plan ~~~~~~~~~~~~~~~~~ This enhancement (added in 24.05) allows libraries to choose which patron email address(es) to use when sending notices. To use, select the email address(es) for sending notices using the EmailFieldPrimary system preference. If the "selected addresses" option is chosen, then use EmailFieldSelection to choose which email address(es) to use - you can select one or more addresses (alternate, primary, secondary, or all email addresses). 1. Go to Koha Administration > System preferences. Search for EmailFieldPrimary. Confirm that you can only select one option at a time. 2. Search for a patron. Put different email addresses in each of the possible email fields (primary email, secondary email, alternate email). TIP: If you only have one Gmail address, put the dot in a different position and check the to field when you receive the email. For example, my.email@gmail.com, m.yemail@gmail.com, and mye.mail@gmail.com. 3. Repeat steps 4-6 for each of these options to confirm that the correct email address(es) are used for the email message: 3.1 EmailFieldPrimary = alternate email 3.2 EmailFieldPrimary = card number (change the patron's card number to a valid email address) 3.3 EmailFieldPrimary = primary email 3.4 EmailFieldPrimary = secondary email 3.5 EmailFieldPrimary = selected addresses with EmailFieldSelection = all, then individually - alternate email, primary email, secondary email 3.6 EmailFieldPrimary = first valid email address For testing, remove the primary email address - email address used should be the secondary email (This uses the EmailFieldPrecedence system preference, and uses the order specified and sends to the first valid email address - default order checked is email|emailpro|B_email, where email = the primary email address, emailpro = the secondary email address, B_email = the alternate email address) 4. Send the welcome message for the patron: go to your patron > More > Send a welcome email 5. Check that the correct address(es) are shown in the database for the option you are testing: 5.1 Access the database: sudo koha-mysql kohadev 5.2 Show the messages in the queue: select * from message_queue; 5.3 Confirm that correct address(es) for the option selected are shown in the to_address field (multiple address will be separated by a comma) 6. Set up KTD so that it can actually send email [1] (without email configured you will not be able to confirm the delivery to multiple addresses). 7. Run misc/cronjobs/process_message_queue.pl to trigger sending the queued notices from steps 3-6. 8. Check that the addresses in the to_address all actually receive the notice for each of the messages generated for steps 3 to 5. TIP: The notices section for the patron now shows the to addresses in the delivery column. [1] To test sending emails using a Google account: - Set up an App password for your Google Account - Configure a new SMTP Server under Administration > SMTP servers using the following settings where 'User name' = your Google email address and 'Password' = your APP password, not your Google account password): Host: smtp.gmail.com Port: 587 Timeout: 120 SSL: STARTTLS User name: GOOGLEACCOUNTUSER Password: GOOGLEAPPPASSWORD - Set this server as default -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Emily, do you think we can do a database update to at least fix the options list? And maybe we could check the value for a false value and correct it for that case? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |RM_priority -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168230|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 168253 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168253&action=edit Bug 37216: Fix SQL for EmailFieldSelection Test plan: Part A: New installation 1. Start a fresh test instance 2. Set EmailFieldPrimary to "selected addresses", and do not touch EmailFieldSelection 3. Edit a patron to ensure the following fields are set: - Primary email - Secondary email - Alternate email - Enable email notices for item checkout 4. Attempt to check an item out to that patron --> Koha explodes! 5. Apply patch 6. reset_all 7. Repeat steps 2-4 --> Checkout succeeds! 8. Ensure test plan for bug 12802 still passes Part B: Upgraded installation 1. Start a fresh test instance at version 23.11 2. Switch to main 3. Install database update 4. Set EmailFieldPrimary to "selected addresses", and do not touch EmailFieldSelection 5. Edit a patron to ensure the following fields are set: - Primary email - Secondary email - Alternate email - Enable email notices for item checkout 6. Attempt to check an item out to that patron --> Koha explodes! 7. Go back to 23.11 and reset_all 8. Switch to main and apply patch 9. Repeat steps 4-6 --> Checkout succeeds! 10. Ensure test plan for bug 12802 still passes Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 168254 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168254&action=edit Bug 37216: (QA follow-up) Add update to set existing options Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168253|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 168255 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168255&action=edit Bug 37216: Fix SQL for EmailFieldSelection Test plan: Part A: New installation 1. Start a fresh test instance 2. Set EmailFieldPrimary to "selected addresses", and do not touch EmailFieldSelection 3. Edit a patron to ensure the following fields are set: - Primary email - Secondary email - Alternate email - Enable email notices for item checkout 4. Attempt to check an item out to that patron --> Koha explodes! 5. Apply patch 6. reset_all 7. Repeat steps 2-4 --> Checkout succeeds! 8. Ensure test plan for bug 12802 still passes Part B: Upgraded installation 1. Start a fresh test instance at version 23.11 2. Switch to main 3. Install database update 4. Set EmailFieldPrimary to "selected addresses", and do not touch EmailFieldSelection 5. Edit a patron to ensure the following fields are set: - Primary email - Secondary email - Alternate email - Enable email notices for item checkout 6. Attempt to check an item out to that patron --> Koha explodes! 7. Go back to 23.11 and reset_all 8. Switch to main and apply patch 9. Repeat steps 4-6 --> Checkout succeeds! 10. Ensure test plan for bug 12802 still passes Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168254|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 168256 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168256&action=edit Bug 37216: (QA follow-up) Add update to set existing options Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 --- Comment #9 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Thanks, all, for the thorough testing and follow-up! I think it's safe to clear the value field if it still contains 'email|emailpro|B_email' too, since that isn't a valid value for that field to have. (If the user actually selects all three, the value will be comma-delimited, not pipe-delimited--that's what crashes the notice generation in the first place.) Adding one more follow-up for that... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 --- Comment #10 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 168298 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168298&action=edit Bug 37216: (follow-up) Clear invalid value -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks for the fix! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|martin.renvoize@ptfs-europe | |.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Bug 37216 depends on bug 12802, which changed state. Bug 12802 Summary: Send notices using several email addresses https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12802 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_24_05_candidate CC| |lisette@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_23_05_candidate, | |rel_23_11_candidate CC| |tomascohen@gmail.com Depends on| |29046 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This fixes an issue introduced by bug 29046, which dates back to 23.05. So that's how far it needs to be backported! Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29046 [Bug 29046] Allow libraries to specify email order for "AutoEmailPrimaryAddress" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|29046 | Keywords|rel_23_05_candidate, | |rel_23_11_candidate | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29046 [Bug 29046] Allow libraries to specify email order for "AutoEmailPrimaryAddress" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to main |Pushed to stable Version(s)|24.11.00 |24.11.00,24.05.04 released in| | --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to stable |Needs documenting --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 12802 not in 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED CC| |caroline.cyr-la-rose@inlibr | |o.com Resolution|--- |FIXED --- Comment #16 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- This looks like a bug fix, nothing to change/edit in the manual. Please reopen with more details if needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37216 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|RM_priority | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org