Bug 28153 comment 3 suggests the preferences should be ordered Alphabetical could differ in different languages, and I think that would be confusing I would suggest a 'logical' ordering - Holds options together, ILL options together, and item option in process order: Checkout, Predue, Due, Checkin Currently the table is ordered by 'message_attribute_id' and these is not a simple way to sort as desired
+1
Created attachment 169763 [details] [review] Bug 29194: Create logical ordering of patron messaging preferences This patch introduces a default ordering for patron messaging preferences. The prefs are then sorted by this ordering before being displayed. To test: 1) Visit a patrons detail page. 2) Note the message prefs aren't ordered (or rather sorted by 'message_attribute_id') 3) Apply patch, restart_all 4) Ensure they are now sorted in teh following fashion: 'Hold_Filled' => 1, 'Hold_Reminder' => 2, 'Recall_Requested' => 3, 'Recall_Waiting' => 4, 'Ill_ready' => 5, 'Ill_unavailable' => 6, 'Ill_update' => 7, 'Item_Checkout' => 8, 'Auto_Renewals' => 9, 'Advance_Notice' => 10, 'Item_Due' => 11, 'Item_Check_in' => 12
This should probably be configurable also, filed Bug 37498 for that additional feature.
Created attachment 169772 [details] [review] Bug 29194: Create logical ordering of patron messaging preferences This patch introduces a default ordering for patron messaging preferences. The prefs are then sorted by this ordering before being displayed. To test: 1) Visit a patrons detail page. 2) Note the message prefs aren't ordered (or rather sorted by 'message_attribute_id') 3) Apply patch, restart_all 4) Ensure they are now sorted in teh following fashion: 'Hold_Filled' => 1, 'Hold_Reminder' => 2, 'Recall_Requested' => 3, 'Recall_Waiting' => 4, 'Ill_ready' => 5, 'Ill_unavailable' => 6, 'Ill_update' => 7, 'Item_Checkout' => 8, 'Auto_Renewals' => 9, 'Advance_Notice' => 10, 'Item_Due' => 11, 'Item_Check_in' => 12 Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
(In reply to Nick Clemens (kidclamp) from comment #0) > Bug 28153 comment 3 suggests the preferences should be ordered > > Alphabetical could differ in different languages, and I think that would be > confusing Not sure why. A staff user will normally use one particular language, I suppose. > Currently the table is ordered by 'message_attribute_id' and these is not a > simple way to sort as desired True. (In reply to Sam Lau from comment #3) > 4) Ensure they are now sorted in teh following fashion: > 'Hold_Filled' => 1, > 'Hold_Reminder' => 2, > 'Recall_Requested' => 3, > 'Recall_Waiting' => 4, > 'Ill_ready' => 5, > 'Ill_unavailable' => 6, > 'Ill_update' => 7, > 'Item_Checkout' => 8, > 'Auto_Renewals' => 9, > 'Advance_Notice' => 10, > 'Item_Due' => 11, > 'Item_Check_in' => 12 This creates maintenance. For each new notice we need to edit this list. While just sorting by name is simple and effective here imo.
(In reply to Marcel de Rooy from comment #6) > (In reply to Nick Clemens (kidclamp) from comment #0) > > Bug 28153 comment 3 suggests the preferences should be ordered > > > > Alphabetical could differ in different languages, and I think that would be > > confusing > > Not sure why. A staff user will normally use one particular language, I > suppose. I think assuming there are bilingual staff in some libraries is not a stretch. The point was really that it won't be a logical grouping if alphabetical > (In reply to Sam Lau from comment #3) > > 4) Ensure they are now sorted in teh following fashion: > > 'Hold_Filled' => 1, > > 'Hold_Reminder' => 2, > > 'Recall_Requested' => 3, > > 'Recall_Waiting' => 4, > > 'Ill_ready' => 5, > > 'Ill_unavailable' => 6, > > 'Ill_update' => 7, > > 'Item_Checkout' => 8, > > 'Auto_Renewals' => 9, > > 'Advance_Notice' => 10, > > 'Item_Due' => 11, > > 'Item_Check_in' => 12 > > This creates maintenance. For each new notice we need to edit this list. > While just sorting by name is simple and effective here imo. We will sort any new ones to the bottom if not specified here: sort { ( $messaging_order{ $a->{message_name} } // 999 ) <=> ( $messaging_order{ $b->{message_name} } // 999 ) } It is 'maintenance' to force specifying an order here, but I think it is worth it for having a sensical order
+1 for logical ordering over alphabetical. Alphabetical really has no meaning in a short list, because you are going to browse it by functional aspects more likely and it's a short list still. Maybe we could add something a grouping and sort alphabetical within? Groups could be ill, holds, circulation, etc.
I do not really mind but personally the alphabetical one seems the best. No problem.
But then we need to sort on translation in the templates... and the sequence will vary for everyone.
(In reply to Katrin Fischer from comment #10) > But then we need to sort on translation in the templates... and the sequence > will vary for everyone. That's the same problem as the tabs with the syspref categories. Nice and alphabetical in English, random when translated. :-)
(In reply to Magnus Enger from comment #11) > (In reply to Katrin Fischer from comment #10) > > But then we need to sort on translation in the templates... and the sequence > > will vary for everyone. > > That's the same problem as the tabs with the syspref categories. Nice and > alphabetical in English, random when translated. :-) Exactly.
Created attachment 172529 [details] [review] Bug 29194: Create logical ordering of patron messaging preferences This patch introduces a default ordering for patron messaging preferences. The prefs are then sorted by this ordering before being displayed. To test: 1) Visit a patrons detail page. 2) Note the message prefs aren't ordered (or rather sorted by 'message_attribute_id') 3) Apply patch, restart_all 4) Ensure they are now sorted in teh following fashion: 'Hold_Filled' => 1, 'Hold_Reminder' => 2, 'Recall_Requested' => 3, 'Recall_Waiting' => 4, 'Ill_ready' => 5, 'Ill_unavailable' => 6, 'Ill_update' => 7, 'Item_Checkout' => 8, 'Auto_Renewals' => 9, 'Advance_Notice' => 10, 'Item_Due' => 11, 'Item_Check_in' => 12 Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Please note discussion on BZ about the preferred order ;)
(In reply to Marcel de Rooy from comment #9) > I do not really mind but personally the alphabetical one seems the best. No > problem. So, passed QA. Note that I could have asked for a test too. But this is a small change and I wont insist given time passed too.
(In reply to Katrin Fischer from comment #12) > (In reply to Magnus Enger from comment #11) > > (In reply to Katrin Fischer from comment #10) > > > But then we need to sort on translation in the templates... and the sequence > > > will vary for everyone. > > > > That's the same problem as the tabs with the syspref categories. Nice and > > alphabetical in English, random when translated. :-) > > Exactly. Just a side note, discussion no longer needed. But js should be able to sort those translations too..
As this affects behavior and also documentation for users and staff, I feel it should not be backported as a bug fix. If you are used now that certain options are always in a certain page, you don't want to be surprised by them suddenly moving in a minor or security update. Updating to enhancement. I'd also like to give a chance to have some feedback on the ordering. I see that this is a "chronological" ordering now. That is one way to do it. Personally, I was still irritated by the Checkout and Checkin no longer being next to each other.
Pushed for 24.11! Well done everyone, thank you!