Permission Tree Display - Root Entries do not Respect Sort Order

Bug #1843940 reported by John Amundson
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.11
Fix Released
Medium
Unassigned

Bug Description

Evergreen 3.2.4ish

Using the "Permission Tree Display Entries" interface in Local Administration, it is possible to create a user-defined order for displaying permission groups in the Patron Registration/Edit screens.

This function works well for the most part. However, if groups are added as "Root Entries", i.e. they have no parent group, and then rearranged, the new order is not respected when viewing their display in Patron Edit/Registration. (The desired order does display correctly in the Permission Tree Display Entries interface, though).

For root entries, the displayed order seems to be based on the id order in permission.grp_tree_display_entry, (this is different than the id of the permission group itself).

For example, if I add three entries to the tree with id/position:
1 / 1
2 / 2
3 / 3

and then update the order to id/position:
2 / 1
3 / 2
1 / 3

Patron Edit/Registration will display them in id order 1, 2, 3.

I think the issue with id goes further, as well. The following may not be experienced by many, (or any), staff, but it's worth mentioning since it is seems very related.

Permission groups will only display under a parent group if the child group has a larger ID, (i.e. 10), than the parent group, (i.e. 5). If the ID is not larger, it can lead to a lot of issues with display and use.

For most users, this should not be a problem. Because child groups can only be added to a parent group once the parent group exists, the child group's ID is going to be larger than the parent group. I only ran into this issue because I created a tree at the consortium level that I wanted to use as a base for a handful of my libraries. We have a large number of groups, so it made more sense to try to duplicate the display in the database for the special org units and then make small changes in the client. This led to a LOT of issues and frustration that was finally solved by adjusting id and position so everything could live in harmony.

In an ideal world, the Permission Tree Display should disregard id order and base positioning on position and parent structure.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Katie Greenleaf Martin (kgmspark) wrote :

Confirming that this is still an issue in 3.7 - you can reorder non-root entries but not root entries. We get around this by adding Patron and Staff first then adding entries to those groups, but the interface is not very clear on how you should do that.

Revision history for this message
Elizabeth Davis (elidavis) wrote :

Just for ease of use, it would be nice to be able to add a root entry and have its children be added by default. This would allow an admin to remove a few entries you don't need, rather than having to add all the ones you want.

Revision history for this message
Lena Hernandez (lfhernandez) wrote :

Confirming this is still an issue in 3.11.

Revision history for this message
Michele Morgan (mmorgan) wrote :

I've pushed a working branch to:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/mmorgan/lp1843940_permission_tree_display_sort_order

user/mmorgan/lp1843940_permission_tree_display_sort_order

This patch imposes a descending sort by position on the pgtde pcrud call which respects the permission.grp_tree_display_entry.position field order as stored in the database by the admin interface. This fix addresses sorting of the custom group tree in both the current patron editor as well as the Angular patron editor.

To test on a Concerto system, Create some additional permission groups as children of the Patrons group. Examples:

Public Patron
Homebound
Staff
Online
ILL Card

In Administration - Local Administration - Permission Tree Display Entries, create custom trees for CONS, and other org units.

Add and remove Root entries, add and remove children of root entries, change positions of children of root entries and save changes.

Note that the Main (Profile) Permission Group dropdown in both the current and Experimental patron registration screens matches the custom tree set for the workstation org unit in the admin interface.

Note that the CONS configuration will apply to child org units that do not have a custom tree configured.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 3.12.4
importance: Undecided → Medium
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks, Michele! Pushed to rel_3_11 and above.

tags: added: signedoff
Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
milestone: 3.12.4 → 3.12.5
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.