From a9e3431fd21221f93791104bb376b5250b1209c2 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Fri, 11 Feb 2022 09:44:55 -0500 Subject: [PATCH] LP1959904: Fix Angular Profile Select Component The Angular profile select component has a bug when permission group tree display entries are used. It will loop forever if the grp and parent have the same value in permission.grp_tree_display_entry because it is comparing permission group tree entries to permission group tree display entries in the groups filter of the grpLabel function. This patch adds a ternary operator to compare display entries to display entries and group tree entries to group tree entries in a manner identical to how the parent value is determined a few lines above. See the bug description for more information: https://bugs.launchpad.net/evergreen/+bug/1959904 Signed-off-by: Jason Stephenson Signed-off-by: John Amundson Signed-off-by: Mike Rylander --- .../eg2/src/app/staff/share/patron/profile-select.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/eg2/src/app/staff/share/patron/profile-select.component.ts b/Open-ILS/src/eg2/src/app/staff/share/patron/profile-select.component.ts index 56ff560c60..25ef1cbb80 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/patron/profile-select.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/patron/profile-select.component.ts @@ -116,7 +116,7 @@ export class ProfileSelectComponent implements ControlValueAccessor, OnInit { // Should always produce a value unless a perm group // display tree is poorly structured. - tmp = groups.filter(g => g.id() === pid)[0]; + tmp = groups.filter(g => ((g._display) ? g._display.id() : g.id()) === pid)[0]; depth++; -- 2.43.2