Description
David Nind
2021-12-23 05:22:05 UTC
Working on this. Will attach the finished patch when I'm back from leave on the 5th of January +1 Back from leave and working on this bug now Created attachment 129046 [details] [review] Bug 29761: Batch patron modification page should display patrons once if the same ID is inputted multiple times If a cardnumber, SMS number, or borrower number is inputted multiple times then the batch patron modification page should not display that patron multiple times. Test plan: 1. Create three text files that list card numbers, SMS numbers, and borrower numbers for three patrons. Example lists are below, notice in each there is one number duplicated: Card numbers: 23529000035676 23529000651225 23529000080862 23529000035676 Borrower numbers: 19 49 7 49 SMS numbers: 2125551212 2125551212 2125551213 2125551214 2. Enable sending of SMS messages: * Set SMSSendDriver system preference to Email 3. Make sure the cardnumbers, borrower numbers, and SMS numbers listed above belong to patrons in your Koha 4. Go to Tools > Batch patron modification 5. Upload lists of cardnumbers, SMS numbers, and borrower numbers above, and confirm the following is happening in the batch patron modification page: - Upload the text file of cardnumbers. Notice one patron is displayed twice - Paste in the list of cardnumbers. Notice one patron is displayed twice - Upload the text file of SMS numbers. Notice one patron is displayed twice - Paste in the list of SMS numbers. Notice one patron is displayed twice - Upload the text file of borrower numbers. Notice one patron is displayed twice - Paste in the list of borrower numbers. Notice one patron is displayed twice 6. Apply patch and restart services 7. Repeat step 5 and this time observe that the patron record is not duplicated in the batch patron modification page Sponsored-By: Catalyst IT Ready for testing! Created attachment 129671 [details] [review] Bug 29761: Batch patron modification page should display patrons once if the same ID is inputted multiple times If a cardnumber, SMS number, or borrower number is inputted multiple times then the batch patron modification page should not display that patron multiple times. Test plan: 1. Create three text files that list card numbers, SMS numbers, and borrower numbers for three patrons. Example lists are below, notice in each there is one number duplicated: Card numbers: 23529000035676 23529000651225 23529000080862 23529000035676 Borrower numbers: 19 49 7 49 SMS numbers: 2125551212 2125551212 2125551213 2125551214 2. Enable sending of SMS messages: * Set SMSSendDriver system preference to Email 3. Make sure the cardnumbers, borrower numbers, and SMS numbers listed above belong to patrons in your Koha 4. Go to Tools > Batch patron modification 5. Upload lists of cardnumbers, SMS numbers, and borrower numbers above, and confirm the following is happening in the batch patron modification page: - Upload the text file of cardnumbers. Notice one patron is displayed twice - Paste in the list of cardnumbers. Notice one patron is displayed twice - Upload the text file of SMS numbers. Notice one patron is displayed twice - Paste in the list of SMS numbers. Notice one patron is displayed twice - Upload the text file of borrower numbers. Notice one patron is displayed twice - Paste in the list of borrower numbers. Notice one patron is displayed twice 6. Apply patch and restart services 7. Repeat step 5 and this time observe that the patron record is not duplicated in the batch patron modification page Sponsored-By: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 129672 [details] [review] Bug 29761: Batch patron modification page should display patrons once if the same ID is inputted multiple times If a cardnumber, SMS number, or borrower number is inputted multiple times then the batch patron modification page should not display that patron multiple times. Test plan: 1. Create three text files that list card numbers, SMS numbers, and borrower numbers for three patrons. Example lists are below, notice in each there is one number duplicated: Card numbers: 23529000035676 23529000651225 23529000080862 23529000035676 Borrower numbers: 19 49 7 49 SMS numbers: 2125551212 2125551212 2125551213 2125551214 2. Enable sending of SMS messages: * Set SMSSendDriver system preference to Email 3. Make sure the cardnumbers, borrower numbers, and SMS numbers listed above belong to patrons in your Koha 4. Go to Tools > Batch patron modification 5. Upload lists of cardnumbers, SMS numbers, and borrower numbers above, and confirm the following is happening in the batch patron modification page: - Upload the text file of cardnumbers. Notice one patron is displayed twice - Paste in the list of cardnumbers. Notice one patron is displayed twice - Upload the text file of SMS numbers. Notice one patron is displayed twice - Paste in the list of SMS numbers. Notice one patron is displayed twice - Upload the text file of borrower numbers. Notice one patron is displayed twice - Paste in the list of borrower numbers. Notice one patron is displayed twice 6. Apply patch and restart services 7. Repeat step 5 and this time observe that the patron record is not duplicated in the batch patron modification page Sponsored-By: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Testing notes (koha-testing-docker): 1. For step 5, before the patch is applied, the tab for 'By SMS number' is not available (at the date of testing) unless you apply patch 23291 first. Otherwise, it will appear once the patch for this bug is applied. 2. To add the SMS numbers, you need to edit each patron and add the mobile number to the SMS number field that appears as part of Patron messaging preferences (once the SMSSendDriver system preference is changed to Email). Created attachment 130763 [details] [review] Bug 29761: Prevent batch patron modification to process several time the same patron If a cardnumber, SMS number, or borrower number is inputted multiple times then the batch patron modification page should not display that patron multiple times. Test plan: 1. Create three text files that list card numbers, SMS numbers, and borrower numbers for three patrons. Example lists are below, notice in each there is one number duplicated: Card numbers: 23529000035676 23529000651225 23529000080862 23529000035676 Borrower numbers: 19 49 7 49 SMS numbers: 2125551212 2125551212 2125551213 2125551214 2. Enable sending of SMS messages: * Set SMSSendDriver system preference to Email 3. Make sure the cardnumbers, borrower numbers, and SMS numbers listed above belong to patrons in your Koha 4. Go to Tools > Batch patron modification 5. Upload lists of cardnumbers, SMS numbers, and borrower numbers above, and confirm the following is happening in the batch patron modification page: - Upload the text file of cardnumbers. Notice one patron is displayed twice - Paste in the list of cardnumbers. Notice one patron is displayed twice - Upload the text file of SMS numbers. Notice one patron is displayed twice - Paste in the list of SMS numbers. Notice one patron is displayed twice - Upload the text file of borrower numbers. Notice one patron is displayed twice - Paste in the list of borrower numbers. Notice one patron is displayed twice 6. Apply patch and restart services 7. Repeat step 5 and this time observe that the patron record is not duplicated in the batch patron modification page Sponsored-By: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> JD Amended patch: adjust commit title Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 22.05, thanks to everybody involved [U+1F984] Pushed to 21.11.x for 21.11.03 Doesn't apply cleanly to 21.05, please rebase if needed. |