-
Notifications
You must be signed in to change notification settings - Fork 4
[NAE-2285] Group as a value of userlists #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/7.0.0-rev10
Are you sure you want to change the base?
Conversation
- update tests - switch user/userList field type to actor/actorList type - add attribute fullName to UserValue to render group in the field
WalkthroughRebrands user-related field types to actor-related names and expands Changes
Sequence Diagram(s)(Skipped — changes are renames and data-shape additions without new multi-component control flow.) Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings📚 Learning: 2026-01-07T09:03:11.445ZApplied to files:
📚 Learning: 2026-01-07T09:03:11.445ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
projects/netgrif-components-core/src/lib/search/models/search-index.ts (1)
59-73: Update comments to reflect actor terminology.The enum member has been renamed from
USER_IDtoACTOR_ID, but the JSDoc comments still reference "User and UserListFields" instead of "Actor and ActorListFields". Update the comments to maintain consistency with the rebranding.Apply this diff to update the comments:
/** * Indexed as TEXT * - * Used by User and UserListFields + * Used by Actor and ActorListFields */ EMAIL = 'emailValue', /** * Indexed as TEXT * - * Used by User and UserListFields + * Used by Actor and ActorListFields */ FULL_NAME = 'fullNameValue', /** * Indexed as LONG * - * Used by User and UserListFields + * Used by Actor and ActorListFields */ ACTOR_ID = 'actorIdValue',
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (24)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-field.ts(1 hunks)projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.spec.ts(1 hunks)projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts(2 hunks)projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.spec.ts(2 hunks)projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.ts(2 hunks)projects/netgrif-components-core/src/lib/header/header-modes/search-mode/abstract-search-mode.component.spec.ts(1 hunks)projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts(1 hunks)projects/netgrif-components-core/src/lib/search/models/category/case/case-dataset.ts(2 hunks)projects/netgrif-components-core/src/lib/search/models/category/case/case-simple-dataset.ts(1 hunks)projects/netgrif-components-core/src/lib/search/models/datafield-map-key.ts(1 hunks)projects/netgrif-components-core/src/lib/search/models/search-index.ts(1 hunks)projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/abstract-multi-user-assign.component.spec.ts(1 hunks)projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/base-user-assign-list/abstract-base-user-assign-list.component.spec.ts(1 hunks)projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/multi-user-assign-list/abstract-multi-user-assign-list.component.spec.ts(1 hunks)projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/multi-user-assign-list/abstract-multi-user-assign-list.component.ts(1 hunks)projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/multi-user-assign-list/multi-user-assign-item/abstract-multi-user-assign-item.component.spec.ts(1 hunks)projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/user-assign-list/abstract-user-assign-list.component.spec.ts(1 hunks)projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/user-assign-list/abstract-user-assign-list.component.ts(1 hunks)projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-item/abstract-user-assign-item.component.spec.ts(1 hunks)projects/netgrif-components-core/src/lib/task-content/model/field-type-resource.ts(1 hunks)projects/netgrif-components-core/src/lib/task-content/services/field-converter.service.spec.ts(2 hunks)projects/netgrif-components-core/src/lib/task-content/services/field-converter.service.ts(5 hunks)projects/netgrif-components-core/src/lib/task/services/delegate-task.service.ts(1 hunks)projects/netgrif-components-core/src/lib/view/abstract/sortable-view.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-07-17T12:40:17.526Z
Learnt from: machacjozef
Repo: netgrif/components PR: 281
File: projects/netgrif-components-core/src/lib/task/services/delegate-task.service.ts:80-85
Timestamp: 2025-07-17T12:40:17.526Z
Learning: In test code contexts, using empty strings or placeholder values in UserValue instantiation is acceptable when actual user data is not needed for the test functionality being verified.
Applied to files:
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-item/abstract-user-assign-item.component.spec.tsprojects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/multi-user-assign-list/multi-user-assign-item/abstract-multi-user-assign-item.component.spec.tsprojects/netgrif-components-core/src/lib/header/header-modes/search-mode/abstract-search-mode.component.spec.tsprojects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/base-user-assign-list/abstract-base-user-assign-list.component.spec.tsprojects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/user-assign-list/abstract-user-assign-list.component.spec.tsprojects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/multi-user-assign-list/abstract-multi-user-assign-list.component.spec.tsprojects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.spec.tsprojects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.spec.ts
📚 Learning: 2025-08-21T11:17:07.053Z
Learnt from: renczesstefan
Repo: netgrif/components PR: 295
File: projects/netgrif-components-core/src/lib/filter/models/case-search-request-body.ts:0-0
Timestamp: 2025-08-21T11:17:07.053Z
Learning: In the netgrif-components codebase, `stringId` has been deprecated in favor of `id` in search request bodies like CaseSearchRequestBody. When creating search payloads for SimpleFilter.fromCaseQuery() or similar methods, use `id` instead of `stringId`. However, accessing the `.stringId` property on existing objects like Case is still valid since the objects retain this property.
Applied to files:
projects/netgrif-components-core/src/lib/search/models/category/case/case-simple-dataset.tsprojects/netgrif-components-core/src/lib/search/models/search-index.ts
🧬 Code graph analysis (13)
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-item/abstract-user-assign-item.component.spec.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/multi-user-assign-list/multi-user-assign-item/abstract-multi-user-assign-item.component.spec.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components-core/src/lib/header/header-modes/search-mode/abstract-search-mode.component.spec.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/base-user-assign-list/abstract-base-user-assign-list.component.spec.ts (2)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/model/user-list-injected-data.ts (1)
UserListInjectedData(9-13)
projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/multi-user-assign-list/abstract-multi-user-assign-list.component.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/abstract-multi-user-assign.component.spec.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components-core/src/lib/task-content/services/field-converter.service.ts (4)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-field.ts (1)
UserField(9-27)projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.ts (1)
UserListValue(8-50)projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-field.ts (1)
UserListField(10-72)
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/user-assign-list/abstract-user-assign-list.component.spec.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/multi-user-assign-list/abstract-multi-user-assign-list.component.spec.ts (2)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/model/user-list-injected-data.ts (1)
UserListInjectedData(9-13)
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/user-assign-list/abstract-user-assign-list.component.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.spec.ts (2)
projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.ts (1)
UserListValue(8-50)projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.spec.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
🔇 Additional comments (27)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-field.ts (1)
10-10: The TODO comment appropriately documents planned rebranding as future work outside this PR's scope.The codebase confirms that actor-field rebranding has not been implemented: no
ActorFieldclass exists,ComponentPrefixes.ACTORis not defined, and the TODO comment inuser-field.tsis the only reference to this planned work. The rebranding is intentionally deferred, not incomplete in this PR.However, note that
user-list-field.tsusesComponentPrefixes.USER_LISTand would require similar actor-field rebranding when that work is undertaken, yet it lacks a corresponding TODO comment. Consider adding a matching TODO comment touser-list-field.tsfor consistency.projects/netgrif-components-core/src/lib/task-content/services/field-converter.service.spec.ts (2)
59-60: LGTM!The test correctly updates the field type from
USERtoACTORand validates the backend formatting logic.
125-127: LGTM!The test correctly updates both the field type assignment and the expected resolved type string to reflect the actor terminology.
projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.ts (1)
35-35: LGTM!The constructor call correctly updated to match the expanded UserValue signature with six parameters (including fullName).
projects/netgrif-components-core/src/lib/search/models/datafield-map-key.ts (1)
49-52: LGTM!The icon mapping cases correctly updated from 'user'/'userList' to 'actor'/'actorList', maintaining the appropriate 'person'/'people' icons.
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-item/abstract-user-assign-item.component.spec.ts (1)
56-56: LGTM!The test fixture correctly updated to pass six parameters to the UserValue constructor, including the new fullName parameter. Using empty strings for placeholder values is appropriate in test contexts.
projects/netgrif-components-core/src/lib/view/abstract/sortable-view.ts (1)
72-74: LGTM!The switch cases correctly updated to use 'actor'/'actorList' terminology while maintaining the same sorting logic (FULL_NAME index).
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/multi-user-assign-list/abstract-multi-user-assign-list.component.spec.ts (1)
78-78: LGTM!The test data correctly updated to include the fullName parameter ('admin netgrif'), which appropriately combines the firstName and lastName values.
projects/netgrif-components-core/src/lib/search/models/category/case/case-dataset.ts (2)
176-182: LGTM!The allowed operators section correctly updated to use 'actor'/'actorList' terminology while maintaining the same set of applicable operators (Equals, NotEquals, IsNull).
262-264: LGTM!The elastic keyword resolution correctly updated to use
SearchIndex.ACTOR_IDfor user/userList field types, aligning with the SearchIndex enum rebranding.projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/base-user-assign-list/abstract-base-user-assign-list.component.spec.ts (1)
84-84: LGTM!The UserValue constructor call correctly includes the new fullName parameter in the appropriate position (between lastName and username).
projects/netgrif-components-core/src/lib/header/header-modes/search-mode/abstract-search-mode.component.spec.ts (1)
87-87: LGTM!The UserValue constructor call correctly includes six parameters. Using empty strings for test data is acceptable when only the id is needed for verification.
Based on learnings, empty strings in test contexts are acceptable when actual user data is not needed for the test functionality being verified.
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/user-assign-list/abstract-user-assign-list.component.spec.ts (1)
73-73: LGTM!The UserValue instantiation correctly provides all six parameters in the proper order, with fullName appropriately combining the firstName and lastName values.
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/multi-user-assign-list/multi-user-assign-item/abstract-multi-user-assign-item.component.spec.ts (1)
56-56: LGTM!The UserValue constructor call is correct with six parameters. Using empty strings in test fixtures is acceptable when the test doesn't require actual user data.
Based on learnings, empty strings in test contexts are acceptable when actual user data is not needed for the test functionality being verified.
projects/netgrif-components-core/src/lib/task/services/delegate-task.service.ts (1)
80-82: Empty fullName in UserValue is acceptable for delegate dialog initialization.The delegate side menu uses the UserValue only to pre-select the user (via userId) in the user-assign component. The abstract-user-assign-list component initializes selection based solely on
initiallySelectedUser.idand does not require or display fullName during this initialization phase.projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/user-assign-list/abstract-user-assign-list.component.ts (1)
77-77: The code is correct. UserListItem includes the fullName property through its inheritance chain: UserListItem extends UserResource, which extends UserResourceSmall, which explicitly defines fullName. All properties accessed in this line (id, realmId, firstName, lastName, fullName, username) are properly defined in the interface hierarchy via IUser and UserResourceSmall.projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.spec.ts (1)
7-12: LGTM! Test correctly updated for expanded UserValue constructor.The test properly validates the new six-parameter constructor signature and confirms that the fullName getter returns the provided value.
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/multi-user-assign-list/abstract-multi-user-assign-list.component.ts (1)
58-68: LGTM! UserValue construction correctly updated.Both the select and unselect code paths properly construct UserValue instances with the new six-parameter signature, including
selectedUser.fullName.projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/abstract-multi-user-assign.component.spec.ts (1)
56-67: LGTM! Test UserValue instantiation correctly updated.The tests properly use the new six-parameter constructor with empty string placeholders. Based on learnings, using empty strings or placeholder values in test contexts is acceptable when actual user data is not needed for the test functionality being verified.
projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.spec.ts (3)
9-14: LGTM! UserListValue tests correctly updated.All UserValue instantiations properly include the fullName parameter with a value that logically corresponds to the firstName and lastName fields.
19-20: LGTM! Test case correctly updated.
25-28: LGTM! Test case correctly updated.projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (2)
16-18: LGTM! Constructor signature correctly expanded.The UserValue constructor now accepts fullName as a dedicated parameter rather than computing it. This allows the backend to provide the authoritative full name format.
36-38: LGTM! Getter correctly returns stored fullName.The fullName getter now returns the stored
_fullNamevalue, which is consistent with the constructor change.projects/netgrif-components-core/src/lib/task-content/services/field-converter.service.ts (3)
145-148: LGTM! Field type resolution correctly updated to ACTOR naming.The resolveType method properly returns ACTOR and ACTOR_LIST for UserField and UserListField instances.
182-186: LGTM! Backend formatting correctly updated to ACTOR naming.The formatValueForBackend method properly handles ACTOR and ACTOR_LIST field types.
295-296: LGTM! UserValue construction includes fullName parameter.The formatValueFromBackend method correctly constructs UserValue with the new six-parameter signature, including
value.fullName.
projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.ts
Outdated
Show resolved
Hide resolved
projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts
Outdated
Show resolved
Hide resolved
projects/netgrif-components-core/src/lib/search/models/category/case/case-simple-dataset.ts
Show resolved
Hide resolved
projects/netgrif-components-core/src/lib/task-content/model/field-type-resource.ts
Show resolved
Hide resolved
projects/netgrif-components-core/src/lib/task-content/services/field-converter.service.ts
Show resolved
Hide resolved
- fix tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
@projects/netgrif-components/src/lib/side-menu/content-components/multi-user-assign/multi-user-assign-list/multi-user-assign-item/multi-user-assign-item.component.spec.ts:
- Line 45: Update the test to use realistic UserValue data and add a focused
assertion for the new fullName parameter: replace the empty-string fields when
constructing the UserValue instance in multi-user-assign-item.component.spec.ts
(the user variable created via new UserValue(...)) with representative values
(e.g., 'John Doe' for fullName, '[email protected]' for email) and add a small
unit test that constructs a UserValue and asserts that its fullName property (or
getter) returns the expected string to ensure the new parameter is stored and
retrieved correctly.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
projects/netgrif-components/src/lib/side-menu/content-components/admin-impersonate/admin-impersonate-list/admin-impersonate-item/admin-impersonate-item.component.spec.tsprojects/netgrif-components/src/lib/side-menu/content-components/admin-impersonate/admin-impersonate-list/admin-impersonate-list.component.spec.tsprojects/netgrif-components/src/lib/side-menu/content-components/multi-user-assign/multi-user-assign-list/multi-user-assign-item/multi-user-assign-item.component.spec.tsprojects/netgrif-components/src/lib/side-menu/content-components/multi-user-assign/multi-user-assign-list/multi-user-assign-list.component.spec.tsprojects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-item/user-assign-item.component.spec.tsprojects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-list.component.spec.ts
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-17T12:40:17.526Z
Learnt from: machacjozef
Repo: netgrif/components PR: 281
File: projects/netgrif-components-core/src/lib/task/services/delegate-task.service.ts:80-85
Timestamp: 2025-07-17T12:40:17.526Z
Learning: In test code contexts, using empty strings or placeholder values in UserValue instantiation is acceptable when actual user data is not needed for the test functionality being verified.
Applied to files:
projects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-list.component.spec.tsprojects/netgrif-components/src/lib/side-menu/content-components/admin-impersonate/admin-impersonate-list/admin-impersonate-list.component.spec.tsprojects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-item/user-assign-item.component.spec.tsprojects/netgrif-components/src/lib/side-menu/content-components/multi-user-assign/multi-user-assign-list/multi-user-assign-list.component.spec.tsprojects/netgrif-components/src/lib/side-menu/content-components/admin-impersonate/admin-impersonate-list/admin-impersonate-item/admin-impersonate-item.component.spec.ts
🧬 Code graph analysis (5)
projects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-list.component.spec.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components/src/lib/side-menu/content-components/admin-impersonate/admin-impersonate-list/admin-impersonate-list.component.spec.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-item/user-assign-item.component.spec.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components/src/lib/side-menu/content-components/multi-user-assign/multi-user-assign-list/multi-user-assign-list.component.spec.ts (2)
projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.ts (1)
UserListValue(8-50)projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
projects/netgrif-components/src/lib/side-menu/content-components/admin-impersonate/admin-impersonate-list/admin-impersonate-item/admin-impersonate-item.component.spec.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: Matrix Test (22)
- GitHub Check: Test with SonarCloud
- GitHub Check: Matrix Test (20)
- GitHub Check: Matrix Test (24)
- GitHub Check: task-list-completed
🔇 Additional comments (5)
projects/netgrif-components/src/lib/side-menu/content-components/multi-user-assign/multi-user-assign-list/multi-user-assign-list.component.spec.ts (1)
66-66: LGTM! UserValue constructor updated correctly.The addition of the
fullNameparameter ('admin netgrif') correctly aligns with the updated UserValue constructor signature and is consistent with the firstName and lastName values. Based on learnings, using placeholder values in test contexts is acceptable when actual user data is not needed for the test functionality being verified.projects/netgrif-components/src/lib/side-menu/content-components/admin-impersonate/admin-impersonate-list/admin-impersonate-item/admin-impersonate-item.component.spec.ts (1)
42-42: LGTM!The UserValue constructor call correctly updated to the new 6-parameter signature, adding the
fullNameparameter. Using empty strings is appropriate in this test context since the test only verifies component creation.Based on learnings, using empty strings or placeholder values in UserValue instantiation is acceptable when actual user data is not needed for the test functionality being verified.
projects/netgrif-components/src/lib/side-menu/content-components/admin-impersonate/admin-impersonate-list/admin-impersonate-list.component.spec.ts (1)
66-66: LGTM!The UserValue constructor call correctly updated to the new 6-parameter signature. The
fullNamevalue 'admin netgrif' is a logical concatenation of the firstName and lastName, providing realistic test data for the impersonate list component.projects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-item/user-assign-item.component.spec.ts (1)
42-42: LGTM! Constructor call correctly updated.The UserValue instantiation has been correctly updated to include the new
fullNameparameter (5th argument), matching the expanded constructor signature. Using empty strings for test data is acceptable here, as the test only verifies component creation rather than user-specific functionality.Based on learnings, empty strings or placeholder values in UserValue instantiation are acceptable in test contexts when actual user data is not needed for the test functionality being verified.
projects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-list.component.spec.ts (1)
66-66: LGTM! Test data correctly updated to match the new UserValue constructor.The addition of the
fullNameparameter ('admin netgrif') aligns with the updated constructor signature and provides a reasonable value composed of firstName and lastName. Based on learnings, placeholder values in test contexts are acceptable when the test focuses on component creation rather than data validation.
...ssign/multi-user-assign-list/multi-user-assign-item/multi-user-assign-item.component.spec.ts
Show resolved
Hide resolved
- update todo comment
- add optional chaining
- fix switch cases
- fix case-dataset.spec.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In
@projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts:
- Around line 71-72: In the 'actorList' case update the expression to guard
actorValues as well: change uses of
immediate.value?.actorValues.map(...).join(', ') to use optional chaining on
actorValues and the join result (e.g. immediate.value?.actorValues?.map(obj =>
obj.fullName)?.join(', ')) so that if immediate.value or actorValues are
undefined you won't call map/join on undefined.
In
@projects/netgrif-components-core/src/lib/search/models/category/case/case-dataset.ts:
- Around line 81-82: The switch that maps field keys to SearchInputType
currently returns SearchInputType.AUTOCOMPLETE for the 'actor' case but omits
'actorList', causing actorList fields to default to TEXT; add a 'actorList' case
alongside 'actor' in the same switch (the mapping that returns
SearchInputType.AUTOCOMPLETE) so that the code treating operators and elastic
keyword resolution for 'actor' and 'actorList' (see the logic that references
those keys elsewhere) will use AUTOCOMPLETE consistently.
In
@projects/netgrif-components-core/src/lib/search/models/category/case/case-simple-dataset.ts:
- Line 118: Switch handling for field types in CaseSimpleDataset is missing
'actorList', causing it to fall through to the default Substring operator;
update the switch (the branch starting with "case 'actor':") to handle both
'actor' and 'actorList' together (e.g., treat 'actorList' the same as 'actor')
so it returns the Equals operator set consistent with case-dataset.ts and the
expected operator behavior.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.tsprojects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.tsprojects/netgrif-components-core/src/lib/search/models/category/case/case-dataset.spec.tsprojects/netgrif-components-core/src/lib/search/models/category/case/case-dataset.tsprojects/netgrif-components-core/src/lib/search/models/category/case/case-simple-dataset.ts
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-21T11:17:07.053Z
Learnt from: renczesstefan
Repo: netgrif/components PR: 295
File: projects/netgrif-components-core/src/lib/filter/models/case-search-request-body.ts:0-0
Timestamp: 2025-08-21T11:17:07.053Z
Learning: In the netgrif-components codebase, `stringId` has been deprecated in favor of `id` in search request bodies like CaseSearchRequestBody. When creating search payloads for SimpleFilter.fromCaseQuery() or similar methods, use `id` instead of `stringId`. However, accessing the `.stringId` property on existing objects like Case is still valid since the objects retain this property.
Applied to files:
projects/netgrif-components-core/src/lib/search/models/category/case/case-simple-dataset.ts
🧬 Code graph analysis (1)
projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.ts (1)
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts (1)
UserValue(6-43)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
- GitHub Check: Matrix Test (20)
- GitHub Check: Matrix Test (22)
- GitHub Check: Matrix Test (24)
- GitHub Check: Test with SonarCloud
- GitHub Check: task-list-completed
🔇 Additional comments (5)
projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.ts (1)
35-35: LGTM! Constructor call correctly updated to match new signature.The UserValue instantiation now includes the fullName parameter (5th argument) as an empty string, correctly matching the expanded 6-parameter constructor signature.
projects/netgrif-components-core/src/lib/search/models/category/case/case-simple-dataset.ts (1)
92-94: LGTM! Field type mapping updated consistently.The change from 'user'/'userList' to 'actor'/'actorList' is correctly applied, mapping both field types to
SearchIndex.ACTOR_ID. This aligns with the broader refactoring across the codebase.projects/netgrif-components-core/src/lib/search/models/category/case/case-dataset.ts (2)
176-182: LGTM! Operator configuration for actor fields is correct.Both 'actor' and 'actorList' field types correctly use the same operator set (Equals, NotEquals, IsNull), which is appropriate for entity-reference fields.
262-264: LGTM! Elastic keyword resolution updated correctly.The change from 'user'/'userList' to 'actor'/'actorList' with
SearchIndex.ACTOR_IDis correctly applied and consistent with the refactoring.projects/netgrif-components-core/src/lib/search/models/category/case/case-dataset.spec.ts (1)
86-87: LGTM! Test data and descriptions updated consistently.All test cases have been correctly updated from 'user'/'userList' to 'actor'/'actorList' field types, maintaining test coverage for both serialization and deserialization scenarios. The changes align with the refactoring in the implementation files.
Also applies to: 145-165, 226-243
projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts
Outdated
Show resolved
Hide resolved
projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts
Show resolved
Hide resolved
projects/netgrif-components-core/src/lib/search/models/category/case/case-dataset.ts
Show resolved
Hide resolved
projects/netgrif-components-core/src/lib/search/models/category/case/case-simple-dataset.ts
Show resolved
Hide resolved
- add optional check - fix typo in function name
|


Description
Allowed rendering groups in user fields and user list fields.
Implements NAE-2285
Dependencies
No new dependencies were introduced
Third party dependencies
No new dependencies were introduced
Blocking Pull requests
There are no dependencies on other PR
How Has Been This Tested?
Manully and existing unit tests
Test Configuration
Checklist:
Summary by CodeRabbit
Refactor
Enhancement
Tests
✏️ Tip: You can customize this high-level summary in your review settings.