发布

  • [OPIK-3444] [BE] Modify auto-extracted attachments processing to avoid deleting of attachments extracted on SDK side (#4431)

    frostbyte_neo 发布于 2025-12-15 15:35:22 +00:00

    • [OPIK-3444] [BE] Updated regex patterns with SDK support. Add and enhance unit tests for AttachmentUtils methods.
    • Updated regex patterns with SDK support and adjusted extraction logic accordingly to accommodate new formats.
    • Added comprehensive unit tests for extractAttachmentReferences to validate extraction logic across diverse scenarios, including duplicates, JSON inputs, and complex patterns.
    • Introduced tests for hasAttachmentReferences to ensure accurate validation of attachment presence in various JSON structures.
    • [OPIK-3444] [BE] Fixed formatting and typos

    • [OPIK-3444] [BE] Simplify AttachmentUtils by removing unused unwrapReference and VALIDATE_REFERENCE_PATTERN.

    • Updated FIND_REFERENCE_PATTERN logic to improve attachment reference detection.
    • Adjusted hasAttachmentReferences implementation to match partial patterns instead of whole strings.
    • Modified related unit tests to align with relaxed pattern validation requirements.
    • [OPIK-3444] [BE] Consolidate AttachmentUtils test classes into AttachmentsUtilsTest
    • Merged test cases from AttachmentUtilsExtractAttachmentReferencesTest and AttachmentUtilsHasAttachmentReferencesTest into AttachmentsUtilsTest for improved test organization.
    • Refactored nested test structures to enhance readability and maintainability.
    • Preserved all existing scenarios while ensuring alignment with updated utility methods.
    • [OPIK-3444] [BE] Update test cases to improve attachment handling logic.
    • Enhanced attachment handling verification by adding coverage for attachments surrounded by text.
    • Updated test validation to account for changes in attachment count and file type checks.
    • [OPIK-3444] [BE] Change visibility of constants and patterns in AttachmentUtils to private for improved encapsulation.
    下载附件