My Products
Help
AllanEgebjerg
CONTRIBUTOR ***

Filter documentType not when also filtering on changedDate after 1/8??

by AllanEgebjerg (Updated ‎12-09-2023 12:12 by AllanEgebjerg )

We just deployed an integration  towards a live customer. 

Everything is working on the test customer, but when querying on the live customer, and filtering  on changedDateTime after 1/8 when it looks like that the other filters are ignored: 

 

 

query ImportPurchaseOrder($cid: Int, $recordsPerPage: Int, $afterCursorValue: String,   $TimeForLastExecution: DateTime) {
  useCompany(no: $cid) {
    orderDocument(
      first: $recordsPerPage,
      after: $afterCursorValue,
      filter: {_and: [{documentType: {_eq: 7}},{transactionType: {_eq: 6}},{changedDateTime: {_gt: $TimeForLastExecution}}]}
    ) {
      totalCount
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
      }
      items {
        orderDocumentNo
        documentType
        transactionType
        changedDateTime
        documentDateAsDate
        orderNo
        
      }
    }
  }
}
variables: {
    "cid": 44737...,
    "recordsPerPage": 20,
    "TimeForLastExecution": "2023-08-01T13:15:06Z",
    "afterCursorValue": null
}

 

 

Whenever I set changedDateTime filter to a date after 1/8 when all documentTypes/transactionTypes are returned. If I set changedDateTime filter to a date before 1/8 then all filters are applied. 

 

If I run the same query on a test customer, then all filters are also applied. 

 

This is really strange, and I hope someone can come up with an explanation and solution?

So far I have to filter the response clientside, but that was really not what was looking for. 

6 REPLIES 6

by Marius Bancila

The fix for this has been deployed to production.

Hi @Marius Bancila

Do you have a release log published somewhere?

Nice to be able to see 

Yes, we do have some release notes: https://docs.business.visma.net/docs/releasenotes

 

Thank you 

by Marius Bancila

We have prioritized this to investigate and fix.

Florian Haase
PARTNER

by Florian Haase (Updated ‎26-09-2023 17:00 by Florian Haase PARTNER )

I guess this is the same problem as in my thread 

Filters on CompanyChangeLog

 

Thats really critical. It seems like if the changedDateTime filter does not hit any row together with the other filters the other filter are being overridden in any way and you get a wrong result.

 

We just recognized the same problem on GeneralLedgerAccounts with filter on accountNo