Skip to content

Conversation

@Retoocs
Copy link
Contributor

@Retoocs Retoocs commented Dec 11, 2025

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

Name Tested on
OS Ubuntu 24.04.1 LTS
Runtime Node 23.6.1
Dependency Manager NPM 11.0.0
Framework version Angular 19.2.2
Run parameters
Other configuration

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes have been checked, personally or remotely, with @...
  • I have commented my code, particularly in hard-to-understand areas
  • I have resolved all conflicts with the target branch of the PR
  • I have updated and synced my code with the target branch
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes:
    • Lint test
    • Unit tests
    • Integration tests
  • I have checked my contribution with code analysis tools:
  • I have made corresponding changes to the documentation:
    • Developer documentation
    • User Guides
    • Migration Guides

Summary by CodeRabbit

  • Refactor

    • Renamed user-related field types and identifiers to "actor" equivalents across UI, search/indexing, and field-type handling; icons and sorting/search mappings updated.
  • Enhancement

    • User/actor data now includes an explicit fullName field instead of composing it on demand.
  • Tests

    • Updated test fixtures and specs to reflect the expanded user/actor value shape.

✏️ Tip: You can customize this high-level summary in your review settings.

- update tests
- switch user/userList field type to actor/actorList type
- add attribute fullName to UserValue to render group in the field
@Retoocs Retoocs self-assigned this Dec 11, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 11, 2025

Walkthrough

Rebrands user-related field types to actor-related names and expands UserValue to include a fullName parameter, updating constructor usages, enums, mappings, and tests across the codebase.

Changes

Cohort / File(s) Summary
UserValue model & tests
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.ts, projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-value.spec.ts
Added private _fullName and constructor parameter; fullName getter returns _fullName. Tests updated to pass the new argument.
UserListValue & tests
projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.ts, projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.spec.ts
getLast() and tests updated to construct UserValue with the extra fullName argument; added TODO comment about rebranding.
Field type enums / resources
projects/netgrif-components-core/src/lib/task-content/model/field-type-resource.ts, projects/netgrif-components-core/src/lib/search/models/search-index.ts
Renamed enum members USERACTOR, USER_LISTACTOR_LIST, and USER_IDACTOR_ID (public API change).
Field conversion & formatting
projects/netgrif-components-core/src/lib/task-content/services/field-converter.service.ts, projects/netgrif-components-core/src/lib/task-content/services/field-converter.service.spec.ts
Switched USER/USER_LIST branches to ACTOR/ACTOR_LIST; (de)serialization and backend formatting updated to include/extract fullName. Tests adjusted.
Immediate data / panel & views
projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts, projects/netgrif-components-core/src/lib/view/abstract/sortable-view.ts
Replaced handling of user/userList with actor/actorList in switch/case mappings and value extraction.
Search dataset & mapping
projects/netgrif-components-core/src/lib/search/models/category/case/case-dataset.ts, projects/netgrif-components-core/src/lib/search/models/category/case/case-simple-dataset.ts, projects/netgrif-components-core/src/lib/search/models/datafield-map-key.ts
Updated type checks, allowed operators, Elastic index mapping and icon mapping from user/userList/USER_ID → actor/actorList/ACTOR_ID.
User-assign components & tests
projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/..., projects/netgrif-components/src/lib/side-menu/content-components/...
Updated all UserValue instantiations and emitted payloads to include fullName; numerous tests updated for new constructor arity.
Delegate & task-related usages
projects/netgrif-components-core/src/lib/task/services/delegate-task.service.ts, projects/netgrif-components-core/src/lib/header/header-modes/search-mode/abstract-search-mode.component.spec.ts
UserValue construction updated to pass fullName in delegate/opening flows and related tests.
Tests & dataset specs
projects/netgrif-components-core/src/lib/search/models/category/case/case-dataset.spec.ts, various component spec files across projects/netgrif-components-core and projects/netgrif-components
Test fixtures and expectations renamed from user/userListactor/actorList; updated test data to supply fullName where applicable.
Misc & minor fixes
projects/netgrif-components-core/src/lib/data-fields/user-field/models/user-field.ts, projects/netgrif-components/schematics/view/create-view-prompt/schematic-create-sidenav-prompt.ts
Added inline TODOs about rebranding; fixed typo addDefaultVauluesaddDefaultValues.

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)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'NAE-2285 Group as a value of userlists' references the issue ID and describes adding group support to user list fields, which aligns with the PR's primary objective of enabling groups in user/user list fields.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c545d31 and ca94343.

📒 Files selected for processing (2)
  • projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts
  • projects/netgrif-components/schematics/view/create-view-prompt/schematic-create-sidenav-prompt.ts
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: Retoocs
Repo: netgrif/components PR: 314
File: projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts:73-74
Timestamp: 2026-01-07T09:03:11.445Z
Learning: In the netgrif/components repository, the `userValues` attribute in user-list-value component is intentionally kept with its current naming despite the actor/actorList refactoring. There is a TODO comment for this refactor to be addressed later.
📚 Learning: 2026-01-07T09:03:11.445Z
Learnt from: Retoocs
Repo: netgrif/components PR: 314
File: projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts:73-74
Timestamp: 2026-01-07T09:03:11.445Z
Learning: In the netgrif/components repository, the `userValues` attribute in user-list-value component is intentionally kept with its current naming despite the actor/actorList refactoring. There is a TODO comment for this refactor to be addressed later.

Applied to files:

  • projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts
📚 Learning: 2026-01-07T09:03:11.445Z
Learnt from: Retoocs
Repo: netgrif/components PR: 314
File: projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts:73-74
Timestamp: 2026-01-07T09:03:11.445Z
Learning: In the netgrif/components repository, switch case 'user' in schematic files (e.g., schematic-create-sidenav-prompt.ts) is intentionally kept and is correct because it does not represent a backend field type attribute, unlike the 'actor' type used for backend field types.

Applied to files:

  • projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts
  • projects/netgrif-components/schematics/view/create-view-prompt/schematic-create-sidenav-prompt.ts
⏰ 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: task-list-completed
  • GitHub Check: Test with SonarCloud
  • GitHub Check: Matrix Test (22)
  • GitHub Check: Matrix Test (24)
  • GitHub Check: Matrix Test (20)
🔇 Additional comments (2)
projects/netgrif-components/schematics/view/create-view-prompt/schematic-create-sidenav-prompt.ts (1)

35-35: LGTM! Typo corrected.

The function name has been correctly fixed from addDefaultVaulues to addDefaultValues, with both the definition and invocation updated consistently.

Also applies to: 41-41

projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts (1)

73-74: LGTM: Optional chaining correctly applied.

The actor case correctly uses optional chaining to safely access fullName. If immediate.value is null/undefined, the expression gracefully returns undefined without throwing an error.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Retoocs Retoocs marked this pull request as ready for review December 12, 2025 10:51
@coderabbitai coderabbitai bot added improvement New feature or request Large labels Dec 12, 2025
Copy link

@coderabbitai coderabbitai bot left a 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_ID to ACTOR_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

📥 Commits

Reviewing files that changed from the base of the PR and between 3355fb8 and d0ad4a4.

📒 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.ts
  • 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
  • projects/netgrif-components-core/src/lib/header/header-modes/search-mode/abstract-search-mode.component.spec.ts
  • projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/base-user-assign-list/abstract-base-user-assign-list.component.spec.ts
  • projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/user-assign-list/abstract-user-assign-list.component.spec.ts
  • projects/netgrif-components-core/src/lib/side-menu/content-components/user-assign/multi-user-assign-list/abstract-multi-user-assign-list.component.spec.ts
  • projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.spec.ts
  • projects/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.ts
  • projects/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 ActorField class exists, ComponentPrefixes.ACTOR is not defined, and the TODO comment in user-field.ts is the only reference to this planned work. The rebranding is intentionally deferred, not incomplete in this PR.

However, note that user-list-field.ts uses ComponentPrefixes.USER_LIST and would require similar actor-field rebranding when that work is undertaken, yet it lacks a corresponding TODO comment. Consider adding a matching TODO comment to user-list-field.ts for 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 USER to ACTOR and 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_ID for 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.id and 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 _fullName value, 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.

@machacjozef machacjozef changed the base branch from release/7.0.0-rev9 to release/7.0.0-rev10 December 15, 2025 14:33
@coderabbitai coderabbitai bot added the Medium label Jan 7, 2026
Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between d0ad4a4 and 9615a34.

📒 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.ts
  • projects/netgrif-components/src/lib/side-menu/content-components/admin-impersonate/admin-impersonate-list/admin-impersonate-list.component.spec.ts
  • 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
  • projects/netgrif-components/src/lib/side-menu/content-components/multi-user-assign/multi-user-assign-list/multi-user-assign-list.component.spec.ts
  • projects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-item/user-assign-item.component.spec.ts
  • projects/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.ts
  • projects/netgrif-components/src/lib/side-menu/content-components/admin-impersonate/admin-impersonate-list/admin-impersonate-list.component.spec.ts
  • projects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign-list/user-assign-item/user-assign-item.component.spec.ts
  • projects/netgrif-components/src/lib/side-menu/content-components/multi-user-assign/multi-user-assign-list/multi-user-assign-list.component.spec.ts
  • projects/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 fullName parameter ('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 fullName parameter. 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 fullName value '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 fullName parameter (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 fullName parameter ('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.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 9615a34 and c545d31.

📒 Files selected for processing (5)
  • projects/netgrif-components-core/src/lib/data-fields/user-list-field/models/user-list-value.ts
  • projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts
  • projects/netgrif-components-core/src/lib/search/models/category/case/case-dataset.spec.ts
  • projects/netgrif-components-core/src/lib/search/models/category/case/case-dataset.ts
  • projects/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_ID is 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

- add optional check
- fix typo in function name
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 7, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
43.3% Coverage on New Code (required ≥ 50%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement New feature or request Large Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants