Bug 75259 - FILTER Auto filter on imported database range does not work on columns of data type text
Summary: FILTER Auto filter on imported database range does not work on columns of dat...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.1.1 release
Hardware: All All
: medium major
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.3
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-20 13:40 UTC by Nikos
Modified: 2014-03-18 23:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos 2014-02-20 13:40:10 UTC
Steps to reproduce:
* Connect an exiting database.
* Press F4 and drag a query including a field of type text into Cell A1 of a new spreadsheet file (ods).
* from cell A1 press Ctrl + Shift + End to select the whole range
* Data --> Filter --> Auto Filter
* Select an existing entry from the drop down menu ON A FIELD BEING OF TYPE TEXT AND INCLUDING NUMBERS. e.g. the string 36000.
Expected behavior:
*Filter applied
Actual behavior
*Nothing is shown (all entries are hidden).

Worth noting:
1.Selecting the whole range and copying it into a new document, the filter is working as expected.
2. Saving and closing the document --> filter is working. However if you insert a new query in the document and repeat the above steps, it is not working until saved, closed and reopened.
3. This is a regression compared to 4.1.5 and prior (I did not install 4.2.0, since my experience with .0 was seldom good) and the usecase should not be too seldom for people using base and calc, which is why I classified it as major.

Unfortunately I cannot provide a document, as:
1. As described under "worth noting", it would not show the bug,
2. The documents I experienced this with, are used for work and contain sensible information.
Comment 1 m_a_riosv 2014-02-21 02:12:27 UTC
Hi Nikos, thanks for reporting.

I can't reproduce with:
Win7x64Ultimate.
Version: 4.2.1.1 Build ID: d7dbbd7842e6a58b0f521599204e827654e1fb8b

Using the database biblio included by default, works for me.
Please can you tried with it.

It is with all databases or only with a specific one?
Comment 2 Nikos 2014-02-21 07:02:08 UTC
I tried with biblio.
created query
SELECT "Pages" FROM "biblio" (since Pages is the only column of type TEXT containing numbers in String form)
Select all --> Data --> Filter --> Autofilter
Choose 256 from the drop down.
Comment 3 Nikos 2014-02-21 07:04:39 UTC
forgot to say...
it is reproducible (for me) with all databases containing numbers saved as strings.
Comment 4 m_a_riosv 2014-02-21 10:33:21 UTC
I can see now.

Reproducible.
Win7x64Ultimate
Version: 4.2.1.1 Build ID: d7dbbd7842e6a58b0f521599204e827654e1fb8b

Selecting through the filter Standard filter and in it marking enable regular expressions, then it works.
Disabling apply search criteria for the whole cell, seems works. (Menu/Tools/Options/LibreOffice calc/calculation).
Copying data to a new spreadsheet works fine, but copying in a new sheet in the same file not.
Saving the file and reopening, does run again fine.
Inserting again data from base, show the bug again.
Comment 5 Nikos 2014-02-22 10:02:45 UTC
Btw. I changed the platform to all, as I am experiencing this also on openSUSE 13.1 64bit.
Comment 6 Kohei Yoshida 2014-02-24 17:08:35 UTC
I'll take this.
Comment 7 Commit Notification 2014-02-24 18:13:55 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d7e5c54451acc9959fd38f0db7eb7e5ac6b38858

fdo#75259: Add unit test for sharing of string pools with undo docs.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2014-02-24 18:14:09 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e752620bf593af8839831f693ec21bb02a8b23d6

fdo#75259: Let undo document share its string pool with the source doc.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Kohei Yoshida 2014-02-24 18:15:23 UTC
4.2 backport: https://gerrit.libreoffice.org/8210
Comment 10 Commit Notification 2014-02-27 06:48:36 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4274001144adeb0b0a1e7da05d52c1bedbe899e5&h=libreoffice-4-2

fdo#75259: Let undo document share its string pool with the source doc.


It will be available in LibreOffice 4.2.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Kohei Yoshida 2014-02-27 16:41:52 UTC
We can mark this one closed now that it's in 4.2.3.
Comment 12 Manish 2014-03-05 06:24:07 UTC
I am facing the problem in Libre Office Calc. i.e.
When I open a existing file and open a filter to find the particular word to press first letter of that word but the cursor does not move on that position. How can I resolve this issue, please let me know.
Manish
Comment 13 m_a_riosv 2014-03-05 22:10:05 UTC
Please Manish, open a new bug and if you can, attach a sample file. I think this one it's not the same issue.
Comment 14 m_a_riosv 2014-03-18 23:05:51 UTC
Thanks Kohei.
Verified Win7x64:
Version: 4.2.3.1 Build ID: 3d4fc3d9dbf8f4c0aeb61498a81f91c5b7922f13
Version: 4.2.4.0.0+ Build ID: e1823627f35e4419880769fdd05acddbd0a9c25c
  TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-03-18_14:25:19
Version: 4.3.0.0.alpha0+ Build ID: 12ae7672f285da1d4c730315e8db23b3396b71cc
  TinderBox: Win-x86@39, Branch:master, Time: 2014-03-14_00:18:00