After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 599064 - Incorrectly filters data that contains blank cells
Incorrectly filters data that contains blank cells
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
1.8.x
Other All
: Normal major
: ---
Assigned To: Jody Goldberg
Jody Goldberg
: 311567 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-10-20 16:09 UTC by VanillaMozilla
Modified: 2009-12-28 17:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Spreadsheet example (2.32 KB, application/x-gnumeric)
2009-10-20 16:09 UTC, VanillaMozilla
Details

Description VanillaMozilla 2009-10-20 16:09:51 UTC
Created attachment 145873 [details]
Spreadsheet example

I have some large spreadsheets that have numerous blank cells.  The advanced
filter incorrectly selects all or most of the rows unless unless the blank
cells are filled in.

Steps to reproduce.  In the example spreadsheet:
1. Select the "Data" block (A5:D8).
2. Data > Filter > Advanced Filter.  The List range will show the selected
block.
3. Select the Criteria range (G3:I5).
4. Select output range (L3:M10).
5. Press "OK".

The output should show only "Mongoose", but incorrectly shows "Zebra".

It's difficult to determine exactly what the nature of the error.  If any blank
cell were sufficient to trigger the error, then you would expect it to select
"Aardvark" and "Cootie" as well.  I tried rearranging the columns in the Data
block and Criteria range, but it always selects any row with a blank in the
"Attitude" column, regardless of position.

By way of verification, Excel, Quattro Pro Windows, and OpenOffice all do this
correctly.
Comment 1 VanillaMozilla 2009-10-20 16:26:34 UTC
First tested for version 1.8.4 for Ubuntu.  I have also confirmed it for version 1.9.1 for Win XP.
Comment 2 Andreas J. Guelzow 2009-10-20 16:35:43 UTC
This is clearly related to bug #311567 (the title of 311567 is misleading, that bug has really 2 parts left: strange handling of blank cells and required headers)
Comment 3 VanillaMozilla 2009-10-20 22:20:05 UTC
Maybe, but it doesn't stop at spaces and there is no crash.
Comment 4 Andreas J. Guelzow 2009-10-21 00:08:26 UTC
When you read the bug report for  bug #311567  you'll find out that the crash has been fixed and it doesn't stop at spaces anymore but:

"2) It sometimes included empty spaces and sometimes didn't. I don't understand
the logic, but I'm assuming there is one - if there is, could it be made
clearer?"
Comment 5 VanillaMozilla 2009-10-21 03:17:04 UTC
Digging into the other bug report, it does appear that this one is probably similar.  The logic is indeed messed up internally, but I don't see a simple rule that describes it completely.

I can tell you, I just checked my spreadsheet, and it extracted 765 of 768 lines.  It should have extracted roughly 1/5 of that number.
Comment 6 Andreas J. Guelzow 2009-10-21 12:07:24 UTC
Would you please check the ranges that you mentioned in the original report. From teh sheet I suspect that you mean:
A3:D8 for the list range
G3:J5 for the criteria range.
Comment 7 VanillaMozilla 2009-10-21 22:41:55 UTC
Yes, that's correct.  Sorry, I made TWO mistakes in the range.
Comment 8 VanillaMozilla 2009-11-18 18:33:04 UTC
Changing the status to clear the NEEDINFO flag.  :-)
Comment 9 Andreas J. Guelzow 2009-12-28 16:23:49 UTC
*** Bug 311567 has been marked as a duplicate of this bug. ***
Comment 10 Andreas J. Guelzow 2009-12-28 17:01:57 UTC
We apparently have find_rows_that_match in value.c and find_cells_that_match in the database plugin. They really ought to be primarily the same (and the database version seems to be doing the right thing).

Of course we really should have a database plugin use the version in value.c.
Comment 11 Andreas J. Guelzow 2009-12-28 17:06:29 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.