Bugs in Exclusion filter for Hierarchy and Drillthrough

Answered
eze@wejugo.com asked on April 26, 2022

Here are two bugs we've found when using a Hierarchy with a Custom Data Source API implementation
https://jsfiddle.net/ezk84/Ls50pavt/9/
Here I have a 4 level Date hierarchy with a special Day member 0

  1. If I open the Date filter, navigate to 2020 > Q1 > Jan, deselect 0 and click Apply, the query that gets sent to the backend includes filters for 31 members with Day = 0 instead of the expected 1...31.
  2. If instead I right click on a value corresponding to any member that isn't 0 and click Drillthrough, then the filter in the query that gets sent to the backend includes the member with Day = 0 instead of the actual member I had selected.

I have included in the example the actual (correct as per the data) response that my server sends to these erroneous queries so the example works.
Regards,
Ezequiel

6 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster April 27, 2022

Hello, Ezequiel!

Thank you for reporting these issues.

Currently, all levels of multilevel hierarchies in Flexmonster should have the "string" type.
The reason for the issue is that you have different data types in the "Date" hierarchy. Inside the getSchema function (/fields request), "Year" and "Day" fields are having type: "number", while "Quarter" and "Month"type: "string". When all the types inside the hierarchy are set as "string", the request query will be correct.

Please see this JSFiddle, based on your example, with filter queries working as expected: https://jsfiddle.net/flexmonster/0n6ukejc/.

Feel free to contact us if any other questions arise.

Best Regards,
Maksym

Public
eze@wejugo.com April 28, 2022

Okay, thank you. It's not an intuitive reason, but understandable.
Would be good if the documentation made this restriction on hierarchy fields clear.
Cheers,
Ezequiel
 

Public
Maksym Diachenko Maksym Diachenko Flexmonster April 28, 2022

Hi, Ezequiel

Thank you for your feedback.
We will take a closer look and improve the multilevel hierarchy section.
As always, feel free to reach out to us if further questions arise.

Best Regards,
Maksym

Public
Maksym Diachenko Maksym Diachenko Flexmonster May 3, 2022

Hi, Ezequiel!

Hope you are doing well.

Our team has researched the usage of different types with multilevel hierarchies. We concluded that the usage of different types should be an available option. Therefore, we fixed these issues in the newest minor release v. 2.9.24. You are welcome to update the component.

Here is our update to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/.

Best Regards,
Maksym

Public
eze@wejugo.com May 5, 2022

Oh that's great. Thanks for the update Flexmonster team!
Works like a charm. 

Public
Maksym Diachenko Maksym Diachenko Flexmonster May 5, 2022

Hi, Ezequiel!

We are happy to hear that our fix works for you. 
Please let us know if any other questions arise.

Best Regards, 
Maksym

Please login or Register to Submit Answer