Description
Andrew Fuerste-Henry
2022-03-16 12:15:24 UTC
This would be great!!! +++++1 Important for libraries that allow self registration. Users create their own logins without linking to their existing card. If we try to merge the two, the login information (password, etc.) is lost. This would be very useful, especially if the Registration Date field was included. I often merge newer accounts (with the correct information) for users that have returned, but have an old/expired account. It would be nice to keep their original registration date. Our network offers self-registration and I merge many cards. I'm truly amazed this is not already an option when merging. Patrons who are registered more than once often have updated information that is not in the older record. This would be an important enhancement as more libraries are offering online registration. Created attachment 186382 [details] [review] Bug 30303: Add ui for copying values when merging patrons When merging two patrons this patch adds a new checkbox to 'Copy values from the record to be deleted' To test: - Apply patches and restart_all 1. From select two patrons and click 'Merge selected patrons' 2. Select one of the records 3. Check the new box to 'Copy values from the record to be deleted' 4. A diff of the two patrons is shown with checkboxes for each field 5. Confirm checking and un-checking the boxes updates the diff as expected 6. Confirm changing the patron selection updates the diff as expected. 7. Confirm un-checking and re-checking the Copy values from the record to be deleted resets the check boxes for the fields to copy 8. Select some fields to copy values and click merge patrons 9. Confirm the values were copied as expected Sponsored-by: CLAMS Created attachment 186383 [details] [review] Bug 30303: Copy values to keeper record when merging patrons Created attachment 186572 [details] [review] Bug 30303: (follow-up) Update diff highlighting instead of swapping columns This patch makes the ui more visually consistent and intuitive This is so cool! I noticed that after merging, if I hit the browser's back button, it takes me back to the field selection where I am once again able to select the fields to retain. Surprisingly, the new choices would still apply after hitting "Merge" the second time, even if Koha says "No valid patrons to merge were found.". But in some sense this feels more like a feature than a bug, because I might have forgotten to select something and this allows me to correct my error. Created attachment 187269 [details] [review] Bug 30303: (follow-up) Stop the back button from loading from cache (In reply to Lari Taskula from comment #8) > This is so cool! Thanks Lari! > I noticed that after merging, if I hit the browser's back button, it takes > me back to the field selection where I am once again able to select the > fields to retain. Surprisingly, the new choices would still apply after > hitting "Merge" the second time, even if Koha says "No valid patrons to > merge were found.". But in some sense this feels more like a feature than a > bug, because I might have forgotten to select something and this allows me > to correct my error. This is sort of just the nature of the browser using a web app like Koha. Different browsers may behave differently too. I understand how in this case it could be confusing though. I think this might be better handled on the server side with HTTP Cache-Control headers like no-cache, no-store or must-revalidate, but this could also be done with javascript to force a reload when the browser's back button is used. I'm not sure if it's necessary, but the last patch forces a reload when you use the back button like this: // Stop the back button loading from cache window.onpageshow = function (e) { if (e.persisted) { window.location.reload(); } } Created attachment 187295 [details] [review] Bug 30303: (follow-up) Only copy values if merge returns results On second thought I think the better solution is to only copy the values if the merge returns results. That way if you use the back button you'll still see the page from the cache, but if you try to select more values to copy and submit the form again no values will be copied. That way the No valid patrons to merge were found message is accurate. Thanks for testing and feedback Lari! Created attachment 187306 [details] [review] Bug 30303: Add ui for copying values when merging patrons When merging two patrons this patch adds a new checkbox to 'Copy values from the record to be deleted' To test: - Apply patches and restart_all 1. From select two patrons and click 'Merge selected patrons' 2. Select one of the records 3. Check the new box to 'Copy values from the record to be deleted' 4. A diff of the two patrons is shown with checkboxes for each field 5. Confirm checking and un-checking the boxes updates the diff as expected 6. Confirm changing the patron selection updates the diff as expected. 7. Confirm un-checking and re-checking the Copy values from the record to be deleted resets the check boxes for the fields to copy 8. Select some fields to copy values and click merge patrons 9. Confirm the values were copied as expected Sponsored-by: CLAMS Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi> Created attachment 187307 [details] [review] Bug 30303: Copy values to keeper record when merging patrons Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi> Created attachment 187308 [details] [review] Bug 30303: (follow-up) Update diff highlighting instead of swapping columns This patch makes the ui more visually consistent and intuitive Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi> Created attachment 187309 [details] [review] Bug 30303: (follow-up) Only copy values if merge returns results Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi> |