workfloworchestrator / orchestrator-core

The workflow orchestrator core repository
Apache License 2.0
45 stars 15 forks source link

[Bug]: FilterBy does an like comparison instead of exact match #778

Open wouter1975 opened 2 weeks ago

wouter1975 commented 2 weeks ago

Contact Details

No response

What happened?

Summary

The following GQL call uses the filterBy on the customer shortcode. In one example request the service for OU will find matches for OU and Testaccount, which results in incorrect data.

Related FE ticket: https://github.com/workfloworchestrator/orchestrator-ui-library/issues/1542

query SubscriptionsForCustomerQuery($shortcode: String!, $numberOfSubscriptionsPerCustomer: Int!, $filterSubscriptionBy: [GraphqlFilter!]) {
    customers (filterBy: { field: "shortcode", value: $shortcode}) {
        page {
            customerId
            subscriptions (first: $numberOfSubscriptionsPerCustomer, after: 0, filterBy: $filterSubscriptionBy, sortBy: [{field: "productTag", order: ASC}] ) {
                page {
                    subscriptionId
                    description
                    product {
                        name
                        productType
                        tag
                    }
                    customerDescriptions {
                        description
                        customerId
                    }
                }
            }
        }
    }
}

Solution:

Version

latest

What python version are you seeing the problem on?

No response

Relevant log output

No response

wouter1975 commented 2 weeks ago

SURF ref: https://git.ia.surfsara.nl/netdev/automation/projects/orchestrator/-/issues/2174