Bug 34262 - Add styling to emphasize the "clear selected patrons" button
Summary: Add styling to emphasize the "clear selected patrons" button
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: 22.11
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-12 17:53 UTC by Esther Melander
Modified: 2023-09-13 15:22 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Esther Melander 2023-07-12 17:53:57 UTC
Merging duplicate patrons in succession is adding previously merged duplicates into the merge options.

To Recreate:
1. Self-register Patron A multiple times through the OPAC.
2. Self-register Patron B multiple times through the OPAC.
3. Search for Patron A and merge some of the duplicates.
4. Search for Patron B and select some of the duplicates.

On the next screen selected Patron B duplicates will be shown as well as the previously merged account of Patron A.

5. Select a Patron B account as the surviving record and proceed to merge.

Patron B accounts are merged to the surviving record as well as Patron A's account, causing Patron A to no longer exist.

The current work around is to log out of the staff account and log back in. This seems to clear the session data and allow the proper selections to appear, minus the previously merged account. However, this is not practical when needing to merge a lot of accounts.
Comment 1 Emily Lamancusa 2023-07-13 20:13:03 UTC
Hi Esther, this is a new feature that was added in bug 29971 to make it possible to merge patrons that don't show up on the same page of the search. To the right of the "merge selected patrons" button, there should be another button that says "Patrons selected: N   x Clear" (where N is the number of patrons that are currently selected/remembered). Clicking that button after performing a patron merge should clear the previous selection and ensure that only patrons selected after that are merged.
Comment 2 Esther Melander 2023-07-13 21:13:22 UTC
Thank you, that was not on my radar.

I wonder if some improvements can be made with this though. With all of the testing I did, I did not see that button. Perhaps better contrast. Bolding, changing the font color to red, etc. Right now the coloring of that button is reading as nothing unless pointed out. This is especially true for aging eyes and accessibility.

If the user doesn't see that button, then it causes no end of difficulty.
Comment 3 Owen Leonard 2023-07-18 13:01:01 UTC
If you'd like to customize the style of the message you could add some custom CSS. By default it has this style:

#patron_search_selected {
	background-color: #fafdfa;
	border: 1px solid #408540;
	border-color: #93cb93 #d8ecd8 #d8ecd8 #93cb93;
	border-radius: 3px;
	color: #333;
	display: inline-block;
	font-size: 11px;
	line-height: 1.5;
	padding: 5px 10px;
	text-align: center;
	vertical-align: middle;
	white-space: nowrap;
}

For a more highlighted version you could put this (for example) in the IntranetUserCSS system preference:

#patron_search_selected {
	background-color: #fffbc2;
	border: 1px solid #ff0c00;
	border-color: #ff0c00 #ecafaf #ecafaf #ff0c00;
	font-size: 13px;
	font-weight: bold;
}
Comment 4 Emily Lamancusa 2023-07-18 16:29:23 UTC
Thanks, Owen!
Comment 5 Chris Slone 2023-07-27 16:10:21 UTC
I don't think that emphasizing the button is the total fix here, this is retaining selected patrons past the point that it makes logical sense; if you merge 14 records then do a totally new search it still considers those 14 records to be selected. And it's not just for merging patrons, it's any previous selection, so adding patrons to a list, selecting for batch edit...

Besides the fact that considering 13 records that have been deleted as still being selected, something like merging patrons is a destructive change (to the old records) and so that function at least should clear it out.

I think this is just setting people up for errors.
Comment 6 Lucas Gass 2023-08-14 22:06:59 UTC
(In reply to Chris Slone from comment #5)
> I don't think that emphasizing the button is the total fix here, this is
> retaining selected patrons past the point that it makes logical sense; if
> you merge 14 records then do a totally new search it still considers those
> 14 records to be selected. And it's not just for merging patrons, it's any
> previous selection, so adding patrons to a list, selecting for batch edit...
> 
> Besides the fact that considering 13 records that have been deleted as still
> being selected, something like merging patrons is a destructive change (to
> the old records) and so that function at least should clear it out.
> 
> I think this is just setting people up for errors.

Perhaps the "remember patrons" feature implemented in Bug 29971 should be optional. Maybe a sys pref on/off switch?