Query Builder - Issue with boolean fields when calling validateFields within the ruleChange event

Hello,

When we call the validateFields() inside the method that gets called for the Query Builder's ruleChange event, it seems to cause an issue where setting one of the first conditions to a boolean does not work properly. We need to know the valid status of the builder so it can be used in another component at the time we export the query. Please see the STR and sample link below:

  1. Have an existing query using any number of conditions and types (string, date, number, etc).
  2. Change the first condition in the builder to a boolean value (like Is VIP in the below example).
  3. Observe the exported SQL string below the builder. The first condition will have the field name "Country", when it is supposed to say "VIP".

This seems to be an issue with the field from the last condition overriding the selected boolean condition. It occurs when you are trying to change one of the earlier conditions to a boolean value.

Is this something that can be fixed?

Thank you

6 Replies

KV Keerthikaran Venkatachalam Syncfusion Team February 29, 2024 01:10 PM UTC

Hi KS,


We have confirmed the issue as “GetSqlFromRules method not working properly in boolean fields when calling validateFields within the ruleChange event" and logged a defect report. We will include the fix for this issue in the upcoming main release scheduled for the last week of March 2024.


You will be informed regarding this once the fix is published.


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”


Regards,

KeerthiKaran K V



KS KS March 4, 2024 01:37 PM UTC

Hello,

Is there any possibility of getting a hotfix for this item? We have a tight deadline of a release in mid-April and the timeline of your fix would be cutting it close for us.

Any help would be appreciated.

Thank you,

k



YA YuvanShankar Arunagiri Syncfusion Team March 5, 2024 01:31 PM UTC

Hi KS,


Currently, we are working on your reported issue in the query builder component with high priority. Once we fix your reported issue, we will share the custom NuGet package for your use.


Regards,

YuvanShankar A



KS KS March 19, 2024 02:43 PM UTC

Hello,

Is there any update on this fix?

Thank you,

KS



KV Keerthikaran Venkatachalam Syncfusion Team March 20, 2024 01:02 PM UTC

Hi KS,


We are pleased to inform you that we have successfully resolved the GetSqlFromRules method not working properly in boolean fields when calling validateFields within the ruleChange event. It will be reflected in the upcoming weekly release scheduled for next week. For now, please use the below-attached custom package until then.


Steps to follow:

  • Extract the given custom patch folder.
  • Open the application “node_modules\@syncfusion\ej2-querybuilder” location.
  • Delete all the files inside the ej2-querybuilder folder.
  • Now replace the extracted patch folder files here
  • Now run the sample.


Please let us know if you need any further assistance on this.


Regards,

KeerthiKaran K V


Attachment: ej2querybuilder_72b45f2b.zip


KV Keerthikaran Venkatachalam Syncfusion Team April 2, 2024 09:50 AM UTC

Hi KS,


We are glad to announce that our weekly patch release (25.1.38) has been rolled out. We have included the fix for this “GetSqlFromRules method not working properly in boolean fields when calling validateFields within the ruleChange event” issue in this release. So, we suggest you upgrade our Syncfusion packages to our latest version to resolve this issue on your end (25.1.38).


Sample link: https://stackblitz.com/edit/angular-z54gfd-qb9akk?file=src%2Fapp.component.ts 


Package link: https://www.npmjs.com/package/@syncfusion/ej2-angular-querybuilder


Get back to us if you need any further assistance on this.


Regards,

KeerthiKaran K V


Loader.
Up arrow icon