Bug 144740 - Criteria query (COUNTIF(), MATCH() et al) for numeric values broken considering number formats
Summary: Criteria query (COUNTIF(), MATCH() et al) for numeric values broken consideri...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.0.0.beta1+
Hardware: All All
: highest critical
Assignee: Eike Rathke
URL:
Whiteboard: target:7.3.0 target:7.2.2
Keywords: bibisectNotNeeded, regression
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2021-09-26 19:36 UTC by Eike Rathke
Modified: 2023-02-11 04:59 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Result of this COUNTIF() should be 1 not 2. (7.72 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-09-26 19:36 UTC, Eike Rathke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Rathke 2021-09-26 19:36:02 UTC
Created attachment 175286 [details]
Result of this COUNTIF() should be 1 not 2.

Since the implementation for bug 142910 and the fix for its bug 144253, numeric criteria query for interpreter functions are utterly broken in that they take the number format into account as well, which was meant to be implemented for filtering, AutoFilter etc., but the comparing functions are shared and MUST NOT do such for the interpreter functions.
Comment 1 Commit Notification 2021-09-28 00:26:30 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b60b6bfaafa1315e07108dba50f016975b619c59

Resolves: tdf#144740 Fix broken compareByValue() query, tdf#142910 tdf#144253

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Eike Rathke 2021-09-28 00:27:29 UTC
Pending review
https://gerrit.libreoffice.org/c/core/+/122735 for 7-2
https://gerrit.libreoffice.org/c/core/+/122736 for 7-2-2
Comment 3 Xisco Faulí 2021-09-28 09:27:32 UTC
Verified in

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: ac34bafb6cad056f843ff3ff0dee293bf1e18c56
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Eike, thanks for fixing this issue!!
Comment 4 Commit Notification 2021-09-28 09:29:42 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/825a96114a7693335be000b2aa661df88a02e273

Resolves: tdf#144740 Fix broken compareByValue() query, tdf#142910 tdf#144253

It will be available in 7.2.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2021-09-28 13:26:07 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e5d086c31e6765430f8c366196fb4a2b0c25924d

tdf#144740: sc_subsequent_filters_test2: Add unittest

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2021-09-29 04:33:26 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2-2":

https://git.libreoffice.org/core/commit/dc1642c3225ff4aeada5df749946f406772eb1ff

Resolves: tdf#144740 Fix broken compareByValue() query, tdf#142910 tdf#144253

It will be available in 7.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 V Stuart Foote 2023-02-11 04:59:42 UTC Comment hidden (invalid, obsolete)