Skip to content

Regex filter does not allow to filter for ProductIdentifier "1234567-abcdefgh" #225

@dacky179

Description

@dacky179

Describe the bug
Our application does not have unique productidentifier. We have a combination of productidentifier and configurationkey.
After creation of the product with such a filter I mention 2 faulti behaviors:

  • If I want to find the product in the ui by typing 1234567-abcdefgh i get no results.
  • If I want to import new products i surely check if same product already exists. if a product with identifier "1234567" exists it will match to the check for "1234567-abcdefgh".

This behavior is caused by a regex check in ProductStorage.LoadTypes().
https://github.com/PHOENIXCONTACT/MORYX-AbstractionLayer/blob/db3eeb42343e8c8c6eea5c55232bb1a334df784a/src/Moryx.Products.Management/Implementation/Storage/ProductStorage.cs#L330C8-L330C9

Expected behavior
I expected to find my product by exact identifier match

Screenshots
image
Existing Article:
image
Filter for that article:
image

Environment:

  • OS: Windows10
  • Version 5.15.6

Additional context
I think It was added to allow contains, startwith, endwith and equals search with wildcards from UI.
I would prefer to allow change filter expression to be all but *.
I future I would suggest to move that funtiction to UI side:
let the user decide to search with regex or simplified with * wildchard.
if he choose simplified, the ui code replaces the * with a regex wildcard '.*'
the api always handles the entered string as a regex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions