Skip to content

[NAE-2452] Pre-release bugfixes#336

Merged
tuplle merged 7 commits into
release/7.0.0-rev10from
NAE-2452
Jun 17, 2026
Merged

[NAE-2452] Pre-release bugfixes#336
tuplle merged 7 commits into
release/7.0.0-rev10from
NAE-2452

Conversation

@renczesstefan

@renczesstefan renczesstefan commented Jun 17, 2026

Copy link
Copy Markdown
Member

Description

Fixes NAE-2452

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?

This was tested manually and with unit tests.

Test Configuration

Name Tested on
OS macOS Tahoe 26.3
Runtime Node 20.17.0
Dependency Manager NPM 10.8.2
Framework version Angular 13.3.1
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 @machacjozef
  • 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

Release Notes

  • Bug Fixes
    • Disabled multi-choice and string-collection fields no longer modify values, and autocomplete filtering is cleared while disabled.
    • Multi-choice autocomplete and chip-grid inputs now visually match the disabled state of their form controls.
    • Task panels now correctly block/unblock fields during tab-based reloads based on assignee status.
    • Change password now sends the user’s username as the login value.
  • UI/Style
    • Updated the user search field layout (icon + clear button) to use Material prefix/suffix styling.
  • Tests
    • Improved unit coverage for disabled-state and tab reload behavior.

- Added checks to block actions (add/remove/change) when fields are disabled.
- Passed `UserComparatorService` to task panel components for additional checks.
- Enhanced tests to validate behavior of disabled fields and tab selections.
- Updated input templates to bind `disabled` state to `formControlRef.disabled`.
- Renamed `.search-icon` to `.prefix-icon` in SCSS.
- Replaced `mat-icon` with `matPrefix` for input in HTML.
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@machacjozef, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 31 minutes and 22 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4ec1b7b7-360c-4a7f-98fa-4f3f261e6ce2

📥 Commits

Reviewing files that changed from the base of the PR and between 543faed and e63d912.

📒 Files selected for processing (3)
  • package.json
  • projects/netgrif-components-core/karma.conf.js
  • projects/netgrif-components/karma.conf.js

Walkthrough

Disabled-state guards are added to AbstractMultichoiceAutocompleteFieldComponent and AbstractStringCollectionDefaultFieldComponent so that add, remove, and change operations exit early when the form control is disabled. AbstractTaskPanelComponent gains a UserComparatorService dependency and uses it to call blockFields after tab-triggered task reloads. The user-assign search field UI switches to Material prefix/suffix icon-button styling. Elasticsearch search model updates change the STRING_ID identifier from 'stringId' to 'id' and add dynamic index resolution via OptionalDependencies.

Changes

Disabled-state guards for data fields

Layer / File(s) Summary
Multichoice autocomplete disabled guards
...multichoice-autocomplete-field-component.component.ts, ...multichoice-autocomplete-field.component.html, ...component.spec.ts
Guards add, remove, and change to exit early when formControlRef.disabled is true; change sets filteredOptions to empty; add clears the native input. Template binds [disabled]="formControlRef.disabled". New test verifies all three operations are no-ops when disabled.
String-collection field disabled guards
...abstract-string-collection-default-field.component.ts, ...string-collection-default-field.component.html
Guards remove and add to exit early when formControlRef.disabled is true; add clears the input element. Template binds [disabled]="formControlRef.disabled" on the chip-grid input.

Task panel assignee-based field blocking on tab reload

Layer / File(s) Summary
AbstractTaskPanelComponent: UserComparatorService injection and blockFields logic
...abstract-task-panel.component.ts
Imports UserComparatorService (removes AfterAction), injects it as protected _userComparator, and rewrites the _canReload tab-reload branch to use _callChain.create(...) calling _taskContentService.blockFields(taskShouldBeBlocked) based on assignee presence and compareUsers result.
TaskPanelComponent wiring and tests
...task-panel.component.ts, ...abstract-task-panel.component.spec.ts
Adds UserComparatorService import and constructor parameter to TaskPanelComponent and forwards it to super. Test setup adds tabSelected$ subject, NAE_TAB_DATA provider, and UserComparatorService injection to the test component. New test asserts blockFields(true) is called when an expanded unassigned task reloads on tab selection.

User-assign search field UI update

Layer / File(s) Summary
Search icon and clear button Material styling
...user-assign.component.html, ...user-assign.component.scss
Search icon changed to matPrefix; clear button changed to matSuffix mat-icon-button. CSS class renamed from .search-icon (with margin-right) to .prefix-icon (with font-size: 20px).

Search model Elasticsearch field updates

Layer / File(s) Summary
CaseSearch enum and CaseStringId resolver
...case-search.enum.ts, ...case-string-id.ts
CaseSearch.STRING_ID identifier changed from 'stringId' to 'id'. CaseStringId constructor extended with optional OptionalDependencies parameter. elasticKeywords getter now conditionally resolves Elasticsearch index names via searchIndexResolver.getCoreIndex(...) when OptionalDependencies is available, otherwise falls back to prior _elasticKeywords behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • netgrif/components#295: Updates case search/filter payload field references from stringId to id, aligning with the CaseSearch.STRING_ID enum change in this PR.
  • netgrif/components#318: Introduces identical AbstractTaskPanelComponent and TaskPanelComponent changes around UserComparatorService injection and blockFields-based task reload logic.

Suggested labels

breaking change

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR title 'NAE-2452 Pre-release bugfixes' is vague and generic, using non-descriptive terms like 'bugfixes' without conveying what specific issues were actually fixed. Consider making the title more specific about the main changes, such as 'NAE-2452 Fix disabled state handling in form fields and task panel assignee blocking' or similar to better reflect the primary objectives.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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


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.

@coderabbitai coderabbitai Bot added bugfix improvement New feature or request Medium labels Jun 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@projects/netgrif-components-core/src/lib/panel/task-panel/abstract-task-panel.component.spec.ts`:
- Around line 185-198: Add a new regression test case after the existing test
that covers the scenario where a task is assigned to the current user but the
user lacks finish permission. The test should follow the same pattern as the
existing test by setting up spies on isExpanded, initializeTaskDataFields, and
blockFields, setting _canReload to true, and then triggering
tabSelected$.next(true) to verify that blockFields is called with true even when
the task is assigned but finish permission is denied. This ensures
finish-permission precedence is respected during tab-reload field blocking
logic.

In
`@projects/netgrif-components-core/src/lib/panel/task-panel/abstract-task-panel.component.ts`:
- Around line 202-207: The blockFields logic in the initializeTaskDataFields
callback is computing taskShouldBeBlocked based only on assignee ownership,
which overwrites the previous blocking state that was set based on finish
permissions. To fix this, modify the blockFields call within the
initializeTaskDataFields callback in abstract-task-panel.component.ts to ensure
that taskShouldBeBlocked is true not only when the user is not the assignee but
also when they lack the required finish permission. This way, fields will remain
blocked if either the assignee check or the finish permission check requires
blocking, preventing the second computation from inadvertently unblocking
fields.

In
`@projects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign.component.html`:
- Around line 9-10: The button element in the user-assign component template
that clears the search control (identified by the click handler
`(click)="searchUserControl.setValue('')"` and the conditional
`*ngIf="searchUserControl.value"`) is missing an explicit type attribute. Add
`type="button"` to this button element to prevent it from defaulting to
type="submit" and accidentally submitting an enclosing form when clicked.
- Around line 5-11: The search input and clear button in the
user-assign.component.html file lack proper accessibility labels. Add an
aria-label attribute to the matInput element within the mat-form-field to
provide an accessible name for the search field (ensure it aligns with the
translated placeholder text). Additionally, add an aria-label attribute to the
button element with the (click)="searchUserControl.setValue('')" handler to
describe its purpose for assistive technologies, making it clear that this
button clears the search input.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6df5fe21-c6d9-4158-8fce-30941665cdf7

📥 Commits

Reviewing files that changed from the base of the PR and between a4ca6eb and b021c56.

📒 Files selected for processing (10)
  • projects/netgrif-components-core/src/lib/data-fields/multichoice-field/multichoice-autocomplete-field/abstract-multichoice-autocomplete-field-component.component.spec.ts
  • projects/netgrif-components-core/src/lib/data-fields/multichoice-field/multichoice-autocomplete-field/abstract-multichoice-autocomplete-field-component.component.ts
  • projects/netgrif-components-core/src/lib/data-fields/string-collection-field/string-collection-default-field/abstract-string-collection-default-field.component.ts
  • projects/netgrif-components-core/src/lib/panel/task-panel/abstract-task-panel.component.spec.ts
  • projects/netgrif-components-core/src/lib/panel/task-panel/abstract-task-panel.component.ts
  • projects/netgrif-components/src/lib/data-fields/multichoice-field/multichoice-autocomplete-field/multichoice-autocomplete-field.component.html
  • projects/netgrif-components/src/lib/data-fields/string-collection-field/string-collection-default-field/string-collection-default-field.component.html
  • projects/netgrif-components/src/lib/panel/task-panel/task-panel.component.ts
  • projects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign.component.html
  • projects/netgrif-components/src/lib/side-menu/content-components/user-assign/user-assign.component.scss

Refactored the CaseStringId model to include optional dependencies for elastic keyword resolution. Adjusted the CaseSearch.enum to rename the STRING_ID value to 'id' for consistency. This enhances functionality and improves flexibility in dependency management.
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 17, 2026
- Changed `login` field source from `email` to `username` in `createRequestBody`.
@coderabbitai coderabbitai Bot added the breaking change Fix or feature that would cause existing functionality doesn't work as expected label Jun 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/category/case/case-string-id.ts (1)

33-35: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

duplicate() drops resolver dependencies introduced by the new constructor

Line 34 creates a clone without passing _optionalDependencies. Cloned instances won’t use searchIndexResolver, causing inconsistent Elasticsearch keyword/index resolution versus the original instance.

Proposed fix
 duplicate(): CaseStringId {
-    return new CaseStringId(this._operatorService, this._log);
+    return new CaseStringId(this._operatorService, this._log, this._optionalDependencies);
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@projects/netgrif-components-core/src/lib/search/models/category/case/case-string-id.ts`
around lines 33 - 35, The duplicate() method in the CaseStringId class is not
passing the _optionalDependencies parameter when creating a new instance, which
causes the cloned object to lose resolver dependencies like searchIndexResolver.
Update the duplicate() method to pass _optionalDependencies as a third argument
to the CaseStringId constructor so that the cloned instance maintains the same
resolver configuration as the original instance.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@projects/netgrif-components-core/src/lib/search/models/category/case/case-string-id.ts`:
- Around line 33-35: The duplicate() method in the CaseStringId class is not
passing the _optionalDependencies parameter when creating a new instance, which
causes the cloned object to lose resolver dependencies like searchIndexResolver.
Update the duplicate() method to pass _optionalDependencies as a third argument
to the CaseStringId constructor so that the cloned instance maintains the same
resolver configuration as the original instance.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7adaed97-00bc-4758-aac1-fd0aff2e3fef

📥 Commits

Reviewing files that changed from the base of the PR and between b021c56 and 543faed.

📒 Files selected for processing (3)
  • projects/netgrif-components-core/src/lib/forms/change-password/abstract-change-password.component.ts
  • projects/netgrif-components-core/src/lib/search/models/category/case/case-search.enum.ts
  • projects/netgrif-components-core/src/lib/search/models/category/case/case-string-id.ts

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 17, 2026
- Updated `puppeteer` dependency in `package.json` to version `~24.43.1`.
- Updated `puppeteer` dependency in `package.json` to version `~24.43.1`.
- Updated `puppeteer` dependency in `package.json` to version `~24.43.1`.
@sonarqubecloud

Copy link
Copy Markdown

@tuplle tuplle merged commit 5f3e56e into release/7.0.0-rev10 Jun 17, 2026
11 checks passed
@tuplle tuplle deleted the NAE-2452 branch June 17, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Fix or feature that would cause existing functionality doesn't work as expected bugfix improvement New feature or request Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants