Issue 122862 - Advanced filter uses wrong Data Area
Summary: Advanced filter uses wrong Data Area
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: ui (show other issues)
Version: 4.0.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.1
Assignee: Oliver-Rainer Wittmann
QA Contact:
URL:
Keywords: regression
Depends on:
Blocks: 122870 122955 123161 123163
  Show dependency tree
 
Reported: 2013-07-27 09:39 UTC by Rainer Bielefeld
Modified: 2017-05-20 10:34 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
jsc: 4.0.1_release_blocker+


Attachments
Sample Document (11.45 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-07-27 09:40 UTC, Rainer Bielefeld
no flags Details
patch to known defects caused by 12666 (68.55 KB, patch)
2013-09-06 14:59 UTC, Oliver-Rainer Wittmann
no flags Details | Diff
patch to known defects caused by 12666 (68.55 KB, patch)
2013-09-06 15:17 UTC, Oliver-Rainer Wittmann
no flags Details | Diff
disappeared setting in AdvancedFilter dialog (56.69 KB, image/png)
2013-09-11 08:55 UTC, fanyuzhen
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Bielefeld 2013-07-27 09:39:00 UTC
Steps how to reproduce Reproducible with  "AOO 4.0.0-Dev – German UI / German locale  [AOO400m3(Build:9702)  -  Rev. 1503709 (2013-07-17) ]" on German German WIN7 Home Premium (64bit)", Common 4.0-dev User Profile:

1. Open attached sample document from AOO Start Center
2. Click cell A2 ("Product")
   > Cell cursor appears around A2
3. Menu 'Data -> Filter -> Advanced Filter' 
    A1:F15 becomes selected
4. Continue in Advanced Filter Dialog 'Read Filter Criteria from-> "AnyWhere1"' 
   <ok>
   Expected: Filter works, some rows in data area hiden
   Actual: Error Message "The range does not contain a valid query"

Additional Info:
a) The reason for the problem is that range A1:F15 becomes selected instead of
   A2:F15, what is defined in 'Data -> Define Area -> FilterArea'
b) Correct FilterArea A2:F15 will be selected if In step 3 you use 'Autofilter
   -> Standard Filter' Dropdwon
c) so everything will work fin if in Step 2 you select range A2:F15
d) The problem here might be some leftover from 
   "Bug 40300 - Wrong automatic area selection in auto-filter "? I doubt
   because of "e"
e) That still worked fine with OOo 1.1.5 ... 3.1.1 ... AOO 3.4.1
   Already Reproducible  with server installation of  "AOO 4.0.0-Dev  – 
   English UI / German locale [AOO400m1(Build:9700) - 
   Rev. 1457992 - Rev.1457606]" on German WIN7 Home Premium (64bit)", 
   own separate user profile (First AOO 4.0-Dev version available on my PC)
Comment 1 Rainer Bielefeld 2013-07-27 09:40:14 UTC
Created attachment 81177 [details]
Sample Document

See report how to use
Comment 2 Ariel Constenla-Haile 2013-07-27 10:29:59 UTC
Setting regression keyword.
(There are several regressions with spreadsheets in 4.0.0)
Comment 3 Oliver Brinzing 2013-07-27 11:53:24 UTC
.
Comment 4 Oliver-Rainer Wittmann 2013-08-26 15:12:05 UTC
defect caused by changes for bug 12666
Comment 5 Oliver-Rainer Wittmann 2013-08-27 11:56:34 UTC
I am trying to find a solution.
Comment 6 Oliver-Rainer Wittmann 2013-09-05 13:27:16 UTC
working on a fix.

If the fix does not work, I will revert the changes from bug 12666 to get this regression fixed for AOO 4.0.1
Comment 7 jsc 2013-09-06 08:28:49 UTC
approve showstopper request
Comment 8 jsc 2013-09-06 08:29:18 UTC
set target
Comment 9 Oliver-Rainer Wittmann 2013-09-06 14:59:36 UTC
Created attachment 81472 [details]
patch to known defects caused by 12666
Comment 10 Oliver-Rainer Wittmann 2013-09-06 15:17:09 UTC
Created attachment 81474 [details]
patch to known defects caused by 12666
Comment 11 SVN Robot 2013-09-06 15:44:13 UTC
"orw" committed SVN revision 1520602 into trunk:
122862: adjust code for issue 12666 in order to solve regressions 122862, 122...
Comment 12 Kay 2013-09-09 21:36:12 UTC
Using Linux-32 nightly build (trunk) -- AOO410m1(Build:9750)  -  Rev. 1520602
2013-09-09_04:36:09-Rev.1520958

Fix, based on the attached sample document, seems good for me. Advanced filter applied to A2:F11 with no errors.
Comment 13 Oliver-Rainer Wittmann 2013-09-10 08:29:39 UTC
The fix for this issue also solves bug 122870, bug 122955, bug 123161 and bug 123163
Comment 14 Oliver-Rainer Wittmann 2013-09-10 08:40:13 UTC
defect cause:
The changes of bug 12666 introduced new internal used database ranges for Auto Filter function. I recognized the following problems in these changes:
(1) The newly introduced database ranges are also used for Standard Filter function and Advanced Filter function.
(2) The newly introduced code to determine the right database range for the Auto Filter function, Standard Filter function and Advanced Filter function more or less neglects the existence of user-defined database ranges. User-defined database ranges are not used in scenarios in which the user made no cell selection. User-defined database ranges are changed and adjusted.
(3) The method which checks the existence of an Auto Filter on a certain cell on a certain sheet neglects the cell and just checks, if a newly introduced internal database range exists at the given sheet.
Comment 15 Oliver-Rainer Wittmann 2013-09-10 08:44:03 UTC
(In reply to Oliver-Rainer Wittmann from comment #14)
> defect cause:
> The changes of bug 12666 introduced new internal used database ranges for
> Auto Filter function. I recognized the following problems in these changes:
> (1) The newly introduced database ranges are also used for Standard Filter
> function and Advanced Filter function.
> (2) The newly introduced code to determine the right database range for the
> Auto Filter function, Standard Filter function and Advanced Filter function
> more or less neglects the existence of user-defined database ranges.
> User-defined database ranges are not used in scenarios in which the user
> made no cell selection. User-defined database ranges are changed and
> adjusted.
> (3) The method which checks the existence of an Auto Filter on a certain
> cell on a certain sheet neglects the cell and just checks, if a newly
> introduced internal database range exists at the given sheet.

(4) Undo functionality for the creation of the new introduced internal database ranges is missing.
Comment 16 Oliver-Rainer Wittmann 2013-09-10 08:56:57 UTC
my solution approach:
(A) Restrict the new introduced internal database ranges to the Auto Filter function. To solve bug 12666 it is not needed to used these for Standard Filter function and Advanced Filter function.
(B) Remove newly introduced code to determine the right database range for Auto Filter function. But adapt the existing one to the use of the newly introduced internal database ranges.
(C) Revert the changes to the code which checks the existence of a Auto Filter at a certain cell in a certain sheet
(D) Provide undo functionality for the creation of the newly introduced database ranges for Auto Filter function.
(E) Corrections to code snippets which checks, if a certain database range is an internal one
(F) Minor refactoring resp. code clean-ups:
-- new method to check, if certain database range is an "unnamed" one
-- removal of TAB characters in the source code
Comment 17 fanyuzhen 2013-09-11 08:19:11 UTC
This defect is verified fixed in Windows Nightly build(trunk) AOO410m1(Build:9750)  -  Rev. 1521070 based on the attached sample document
Comment 18 fanyuzhen 2013-09-11 08:52:19 UTC
There is a new problem found when verify this defect, here is the steps:
1. Open attached sample document from AOO Start Center
2. Click cell A2 ("Product")
   > Cell cursor appears around A2
3. Menu 'Data -> Filter -> Advanced Filter' 
    A2:F15 becomes selected
4. Continue in Advanced Filter Dialog 'Read Filter Criteria from-> "AnyWhere1"' 
   <ok>
   > Filter works, some rows in data area hidden
5. Open Advanced Filter Dialog by click menu 'Data -> Filter -> Advanced Filter'
   Expected: "AnyWhere1" displays as value showed in dropdown (please see AdvancedFilter dialog_r1521070.png attached)
   Actual: "- undefined -" displays as value showed in dropdown
Comment 19 fanyuzhen 2013-09-11 08:55:59 UTC
Created attachment 81518 [details]
disappeared setting in AdvancedFilter dialog
Comment 20 Oliver-Rainer Wittmann 2013-09-11 08:58:04 UTC
(In reply to fanyuzhen from comment #17)
> This defect is verified fixed in Windows Nightly build(trunk)
> AOO410m1(Build:9750)  -  Rev. 1521070 based on the attached sample document

Thanks for testing.

Thus, I will integrate the fix into branch AOO401 today.
Comment 21 Oliver-Rainer Wittmann 2013-09-11 09:04:02 UTC
(In reply to fanyuzhen from comment #18)
> There is a new problem found when verify this defect, here is the steps:
> 1. Open attached sample document from AOO Start Center
> 2. Click cell A2 ("Product")
>    > Cell cursor appears around A2
> 3. Menu 'Data -> Filter -> Advanced Filter' 
>     A2:F15 becomes selected
> 4. Continue in Advanced Filter Dialog 'Read Filter Criteria from->
> "AnyWhere1"' 
>    <ok>
>    > Filter works, some rows in data area hidden
> 5. Open Advanced Filter Dialog by click menu 'Data -> Filter -> Advanced
> Filter'
>    Expected: "AnyWhere1" displays as value showed in dropdown (please see
> AdvancedFilter dialog_r1521070.png attached)
>    Actual: "- undefined -" displays as value showed in dropdown

PLEASE, do not mix existing problems with new ones.
Please see http://www.openoffice.org/qa/issue_handling/pre_submission.html
- One problem - one issue

Please submit a new issue.
I will mark the attached screen shot as obsolete.
Comment 22 Oliver-Rainer Wittmann 2013-09-11 09:04:40 UTC
Comment on attachment 81518 [details]
disappeared setting in AdvancedFilter dialog

obsolete, because it belong to another problem
Comment 23 fanyuzhen 2013-09-11 09:27:44 UTC
There is another problem(regression from revision 1520285) found when verify this defect, here is the steps:
1. Open attached sample document from AOO Start Center
2. Click cell A2 ("Product")
   > Cell cursor appears around A2
3. Menu 'Data -> Filter -> Advanced Filter' 
    A2:F15 becomes selected
4. Continue in Advanced Filter Dialog 'Read Filter Criteria from-> "AnyWhere1"' 
   <ok>
   > Filter works, some rows in data area hidden
5. Click Ctrl+Z
   Expected: all rows display, undo the filter action
   Actual: nothing happens, cannot undo
Comment 24 Oliver-Rainer Wittmann 2013-09-11 12:32:12 UTC
(In reply to fanyuzhen from comment #23)
> There is another problem(regression from revision 1520285) found when verify
> this defect, here is the steps:
> 1. Open attached sample document from AOO Start Center
> 2. Click cell A2 ("Product")
>    > Cell cursor appears around A2
> 3. Menu 'Data -> Filter -> Advanced Filter' 
>     A2:F15 becomes selected
> 4. Continue in Advanced Filter Dialog 'Read Filter Criteria from->
> "AnyWhere1"' 
>    <ok>
>    > Filter works, some rows in data area hidden
> 5. Click Ctrl+Z
>    Expected: all rows display, undo the filter action
>    Actual: nothing happens, cannot undo

Again: Please "one problem - one issue"

BTW, I could not reproduce the described defect in recent installation set from Win7 build bot, rev. 1521488
Comment 25 Rainer Bielefeld 2013-09-11 13:50:59 UTC
> Again: Please "one problem - one issue"

I will open a new issue for c#18 problem after some tests and invite "interested users"
Comment 26 SVN Robot 2013-09-11 14:58:37 UTC
"orw" committed SVN revision 1521881 into branches/AOO401:
122862: adjust code for issue 12666 in order to solve regressions 122862, 122...
Comment 27 Oliver-Rainer Wittmann 2013-09-11 15:00:02 UTC
fixed on trunk and branch AOO401
Comment 28 Clarence GUO 2013-09-12 02:53:51 UTC
About YuZhen's test result:
The first issue, I think it is a minor defect but I agree with Oliver, it is a separated issue, should not be covered in 122862.
I can reproduce it in AOO3.4.0 build, so it is not related to the regression 122862 nor 12666.
It is more like a user experience issue, in the last step, what will show in the dialog, leave both select box and cell range picker empty as that in MS Excel, or remember settings in the both controllers. Anyway, leaving select box empty but cell range picker is not, it looks strange. We need behavior discussion to decide the correct behavior. But it should be in post 4.0.1.
The second issue, I cannot reproduce against 1521070 build.
Comment 29 fanyuzhen 2013-09-12 06:39:06 UTC
I have opened a new issue(Bug 123240) for c#18 problem, to clarify, this is not a brand new problem as it exists in 3.4.0, it's just new found when I do more testing around advanced filter function area.
Comment 30 fanyuzhen 2013-09-12 06:44:19 UTC
I show Clarence Guo for c#23 problem, it's strange why it is only reproduced on my Win7, still investigating ..
Comment 31 fanyuzhen 2013-09-12 07:59:41 UTC
Waiting for the build - revision 1521881(branches/AOO401) or higher , to be available for download, to verify this defect( bug 122862)
Comment 32 fanyuzhen 2013-09-12 08:12:27 UTC
Waiting for the build - revision 1521881(branches/AOO401) or higher , to be available for download, to verify this defect( bug 122862)
Comment 33 fanyuzhen 2013-09-13 15:48:37 UTC
It's verified fixed in build AOO401m4(Build:9713)  -  Rev. 1521921 based on the attached sample document