Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#9085 isNull Filter #9086

Merged
merged 7 commits into from
Apr 11, 2023
Merged

Conversation

offtherailz
Copy link
Member

Description

This PR fixes #9085

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

What is the current behavior?

#9085

What is the new behavior?
Filter with only isNull can be applied.
isNull condition is not ignored anymore.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

@offtherailz offtherailz self-assigned this Apr 11, 2023
build/tests.webpack.js Outdated Show resolved Hide resolved
@offtherailz offtherailz marked this pull request as ready for review April 11, 2023 10:28
@ale-cristofori ale-cristofori added this to the 2023.01.01 milestone Apr 11, 2023
@ale-cristofori ale-cristofori added BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch C044-VLAANDEREN-2023-SUPPORT labels Apr 11, 2023
@ale-cristofori
Copy link
Contributor

ale-cristofori commented Apr 11, 2023

@tdipisa tdipisa requested a review from MV88 April 11, 2023 14:01
Comment on lines 625 to 632
}, {
attribute: "attributeNull",
groupId: 1,
exception: null,
operator: "=",
rowId: "1",
type: "string",
value: null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems duplicate of the first

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. Yes it is

@@ -811,7 +828,24 @@ describe('FilterUtils', () => {
value: "isNull"
}]
};
let expected = '<wfs:GetFeature service="WFS" version="2.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd"><wfs:Query typeNames="ft_name_test" srsName="EPSG:4326"><fes:Filter><fes:PropertyIsNull><fes:ValueReference>attributeNull</fes:ValueReference></fes:PropertyIsNull><fes:PropertyIsNull><fes:ValueReference>attributeValid</fes:ValueReference></fes:PropertyIsNull></fes:Filter></wfs:Query></wfs:GetFeature>';
let expected = '<wfs:GetFeature service="WFS" version="2.0" '
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you use template string?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, or spaces will not be the same.

build/tests.webpack.js Outdated Show resolved Hide resolved
@offtherailz offtherailz requested a review from MV88 April 11, 2023 14:32
@MV88 MV88 merged commit d0b2ab9 into geosolutions-it:master Apr 11, 2023
@MV88
Copy link
Contributor

MV88 commented Apr 11, 2023

@ElenaGallo please test in DEV

offtherailz added a commit to offtherailz/MapStore2 that referenced this pull request Apr 12, 2023
* WIP fixing isNull filter

* Improved fix

* Update build/tests.webpack.js

* Fixed tests

* Fixed lint

* Update build/tests.webpack.js

Co-authored-by: Matteo V. <[email protected]>

* Update web/client/utils/__tests__/FilterUtils-test.js

---------

Co-authored-by: Matteo V. <[email protected]>
ale-cristofori pushed a commit that referenced this pull request Apr 13, 2023
)

* WIP fixing isNull filter

* Improved fix

* Update build/tests.webpack.js

* Fixed tests

* Fixed lint

* Update build/tests.webpack.js

Co-authored-by: Matteo V. <[email protected]>

* Update web/client/utils/__tests__/FilterUtils-test.js

---------

Co-authored-by: Matteo V. <[email protected]>
ale-cristofori added a commit that referenced this pull request Apr 13, 2023
) (#9090)

* backport C044-2022.02.xx - #9085 changes to the buildConfig calls (#9086)

* WIP fixing isNull filter

* Improved fix

* Update build/tests.webpack.js

* Fixed tests

* Fixed lint

* Update build/tests.webpack.js

Co-authored-by: Matteo V. <[email protected]>

* Update web/client/utils/__tests__/FilterUtils-test.js

---------

Co-authored-by: Matteo V. <[email protected]>

* removed temporarily failing tests for missing uitls functions

---------

Co-authored-by: Lorenzo Natali <[email protected]>
Co-authored-by: Matteo V. <[email protected]>
Co-authored-by: Alessandro Cristofori <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch C044-VLAANDEREN-2023-SUPPORT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query Panel isNull operator is buggy
3 participants