#327 closed defect (fixed)
Query: The matched objects excluded by layer filter are listed in Query result.
Reported by: | jennyhe | Owned by: | madair |
---|---|---|---|
Priority: | P2 | Milestone: | Future |
Component: | Widgets | Version: | 1.1.1 |
Severity: | Major | Keywords: | |
Cc: | christine.bao@… | Browser: | All |
External ID: | 1277730 | Operating System: | All |
state: | New |
Description
Report from Autodesk QA
Steps:
- Load the attached package.
- Open the flexible web layout by IE.
- Query -> Property Filter -> Autogenerated_SDF_ID, Equal, 11 -> Execute query
Results: One record named "11" are listed in Results panel.
Expected results: Query should do against the layer but not the data source.
Attachments (4)
Change History (9)
by , 15 years ago
Attachment: | 1277730.mgp added |
---|
by , 15 years ago
Attachment: | GetFilterAPI.patch added |
---|
by , 15 years ago
Attachment: | QueryFilter.patch added |
---|
comment:1 by , 15 years ago
comment:2 by , 15 years ago
The patches look good Christine. Please remove the /// false otherwise.
from the method documentation in LayerBase.h - it look like it is just left over from a cut and paste.
comment:3 by , 15 years ago
http://trac.osgeo.org/fusion/attachment/ticket/327/GetFilterAPI.patch is submitted in MapGuide code stream. The related ticket: https://trac.osgeo.org/mapguide/ticket/1154.
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Submit the patches for fixing this defect.
by , 15 years ago
Attachment: | SerializeFilter.patch added |
---|
comment:5 by , 15 years ago
MgMap::Open(resourceService, mapName) needs to serialize/deserialize, so m_filter should be serialized/deserialized in MgLayer, otherwise browser can't get the value.
Attach patch http://trac.osgeo.org/fusion/attachment/ticket/327/SerializeFilter.patch for review.
This patch is tested by the above ticket, and Query widget can get the expected filter.
The indeed of this defect is: Query widget only considers the query condition inside the widget, but ignore the query condition of the layer.
For example, if the layer has a filter "Autogenerated_SDF_ID < 2", the layer in map should only display one feature with Autogenerated_SDF_ID = 1. When user input Autogenerated_SDF_ID=3 as query widget's condition, there should be no result matching because the real condition should be "Autogenerated_SDF_ID < 2 AND Autogenerated_SDF_ID = 3". However currently only "Autogenerated_SDF_ID = 3" is set as query condition, so another feature (Autogenerated_SDF_ID = 3) besides the original one (Autogenerated_SDF_ID = 1) shows in map.
Tech diagnosis:
Based on the above tech diagnosis, attach patch for fixing this defect.
There are two patches:
Question:
As you can see, I added an new API GetFilter() to get the filter of layer definition. Is there any other way to approach this without a new API? I see a function in MgSelectionBase for generate filter, however it is for a difference usage, isn't it?
Thank you for reviewing!