Skip to content

feat: Refactor order indexing logic#476

Merged
kutasinaelena merged 8 commits intodevfrom
feat/virtual-order-indexing
Dec 19, 2025
Merged

feat: Refactor order indexing logic#476
kutasinaelena merged 8 commits intodevfrom
feat/virtual-order-indexing

Conversation

@alexeyshibanov
Copy link
Contributor

@alexeyshibanov alexeyshibanov commented Dec 9, 2025

Description

  • Refactor CustomerOrderChangesProvider and IndexCustomerOrderChangedEventHandler for improved readability, maintainability and extensibility

Note

Refactors order indexing, change logging, and change-provider for overridability and clarity, adds an address property accessor, and switches repository lookups to async EF with improved diff/equality handling.

  • Data/Handlers:
    • IndexCustomerOrderChangedEventHandler:
      • Make Handle virtual; extract ShouldIndexAsync, IndexOrdersAsync, GetOrderIndexEntries and enqueue only when entries exist.
    • LogChangesOrderChangedEventHandler:
      • Extract GetOperationLogs, refactor differences handling via switches; TryToLogChangesBackgroundJob returns Task.
      • Cache auditable props by Type; improve DifferenceComparer and use case-insensitive property matching.
      • Null-safe address comparison; streamline address logging and stringification.
  • Search/Indexed:
    • CustomerOrderChangesProvider:
      • Make APIs virtual; add ChangeLogObjectType.
      • Use EF Core async (CountAsync, ToArrayAsync); include ModifiedDate fallback; rename helpers to *Async.
      • Build change-log criteria using discovered types or single object type.
  • Core:
    • Model/Address: add GetAllProperties() wrapper used for address stringification.

Written by Cursor Bugbot for commit 8379121. This will update automatically on new commits. Configure here.

References

QA-test:

Jira-link:

Artifact URL:

https://vc3prerelease.blob.core.windows.net/packages/VirtoCommerce.Orders_3.864.0-pr-476-8379.zip

…ngedEventHandler for improved readability, maintainability and extensibility
@alexeyshibanov alexeyshibanov changed the title feat: Refactor CustomerOrderChangesProvider and IndexCustomerOrderChangedEventHandler for improved readability, maintainability and extensibility feat: Refactor CustomerOrderChangesProvider and IndexCustomerOrderChangedEventHandler Dec 9, 2025
Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

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

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.087
Timestamp: 09-12-2025T17:32:56

Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

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

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.535
Timestamp: 11-12-2025T11:18:14

Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

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

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 8.642
Timestamp: 13-12-2025T15:50:16

@alexeyshibanov alexeyshibanov changed the title feat: Refactor CustomerOrderChangesProvider and IndexCustomerOrderChangedEventHandler feat: Refactor order indexing logic Dec 13, 2025
Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

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

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 9.675
Timestamp: 13-12-2025T17:22:44

Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

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

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.89
Timestamp: 14-12-2025T11:15:41

…d clarity and consistency"

This reverts commit 2507253.
Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

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

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.967
Timestamp: 14-12-2025T13:31:58

@OlegoO OlegoO requested a review from artem-dudarev December 15, 2025 07:11
Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

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

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.97
Timestamp: 18-12-2025T16:39:11

artem-dudarev
artem-dudarev previously approved these changes Dec 18, 2025
@sonarqubecloud
Copy link

Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

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

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.808
Timestamp: 18-12-2025T17:20:20

@kutasinaelena kutasinaelena merged commit d40e7bb into dev Dec 19, 2025
8 checks passed
@kutasinaelena kutasinaelena deleted the feat/virtual-order-indexing branch December 19, 2025 18:13
alexeyshibanov added a commit that referenced this pull request Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants