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

Issue editing multiple fields in MapStore Attribute Table #10648

Closed
1 task done
mahmoudadel54 opened this issue Nov 5, 2024 · 0 comments · Fixed by #10651, #10653 or #10654
Closed
1 task done

Issue editing multiple fields in MapStore Attribute Table #10648

mahmoudadel54 opened this issue Nov 5, 2024 · 0 comments · Fixed by #10651, #10653 or #10654

Comments

@mahmoudadel54
Copy link
Contributor

mahmoudadel54 commented Nov 5, 2024

The bug is with editing multiple attributes in Attribute Table for which only one of them is saved.
Basically MapStore is performing WFS-T request with a wrong XML syntax in this case.
The body of the XML is:

<wfs:Transaction service="WFS" version="1.1.0"
	xmlns:wfs="http://www.opengis.net/wfs"
	xmlns:gml="http://www.opengis.net/gml"
	xmlns:ogc="http://www.opengis.net/ogc"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs"
	xmlns:mapstore="http://gs-stable.geo-solutions.it/geoserver/mapstore">
	<wfs:Update typeName="mapstore:Types">
		<wfs:Property>
			<wfs:Name>Integer</wfs:Name>
			<wfs:Value>20</wfs:Value>
		</wfs:Property>
		<ogc:Filter>
			<ogc:FeatureId fid="Types.1"/>
		</ogc:Filter>
	</wfs:Update>,
        
	<wfs:Update typeName="mapstore:Types">
		<wfs:Property>
			<wfs:Name>Long</wfs:Name>
			<wfs:Value>33</wfs:Value>
		</wfs:Property>
		<ogc:Filter>
			<ogc:FeatureId fid="Types.1"/>
		</ogc:Filter>
	</wfs:Update>
</wfs:Transaction>

While for editing multiple attributes it should be something like the following:

<wfs:Transaction service="WFS" version="1.1.0"
	xmlns:wfs="http://www.opengis.net/wfs"
	xmlns:gml="http://www.opengis.net/gml"
	xmlns:ogc="http://www.opengis.net/ogc"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs"
	xmlns:mapstore="http://gs-stable.geo-solutions.it/geoserver/mapstore">
	<wfs:Update typeName="mapstore:Types">
		<wfs:Property>
			<wfs:Name>Integer</wfs:Name>
			<wfs:Value>20</wfs:Value>
		</wfs:Property>,
		
		<wfs:Property>
			<wfs:Name>Long</wfs:Name>
			<wfs:Value>33</wfs:Value>
		</wfs:Property>
		<ogc:Filter>
			<ogc:FeatureId fid="Types.1"/>
		</ogc:Filter>
	</wfs:Update>
</wfs:Transaction>

How to reproduce

DRAFT LIST OF STEPS

  • Open a map with a geoserver layer that can be edited for testing
  • Edit multiple attribute values

Expected Result

All edited attributes are persisted as expected

Current Result

Only one of them is saved

  • Not browser related
Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Internet Explorer
Edge
Chrome
Firefox
Safari

Other useful information

@mahmoudadel54 mahmoudadel54 self-assigned this Nov 5, 2024
mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this issue Nov 5, 2024
…ibute Table

Description:
- edit in update wfs-t xml payload in case of multi-edit in each sigle row
- add unit test for 'savePendingFeatureGridChanges'
@mahmoudadel54 mahmoudadel54 linked a pull request Nov 5, 2024 that will close this issue
12 tasks
mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this issue Nov 5, 2024
…from epics/featuregrid to FeatureGridUtils file and a unit test is added for it.
mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this issue Nov 5, 2024
mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this issue Nov 5, 2024
MV88 pushed a commit that referenced this issue Nov 5, 2024
…0651)

* #10648: Issue editing multiple fields in MapStore Attribute Table
Description:
- edit in update wfs-t xml payload in case of multi-edit in each sigle row
- add unit test for 'savePendingFeatureGridChanges'

* #10648: move 'createChangesTransaction' util function from epics/featuregrid to FeatureGridUtils file and a unit test is added for it.

* #10648: handle unit test for 'savePendingFeatureGridChanges'

* #10648: edit jsdoc for util 'createChangesTransaction'
@ElenaGallo ElenaGallo self-assigned this Nov 5, 2024
@tdipisa tdipisa added this to the 2024.02.01 milestone Nov 5, 2024
@tdipisa tdipisa added the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Nov 5, 2024
rmelarab-ngs pushed a commit to ngsllc/MapStore2 that referenced this issue Nov 5, 2024
…ibute Table (geosolutions-it#10651)

* geosolutions-it#10648: Issue editing multiple fields in MapStore Attribute Table
Description:
- edit in update wfs-t xml payload in case of multi-edit in each sigle row
- add unit test for 'savePendingFeatureGridChanges'

* geosolutions-it#10648: move 'createChangesTransaction' util function from epics/featuregrid to FeatureGridUtils file and a unit test is added for it.

* geosolutions-it#10648: handle unit test for 'savePendingFeatureGridChanges'

* geosolutions-it#10648: edit jsdoc for util 'createChangesTransaction'
mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this issue Nov 6, 2024
…ibute Table (geosolutions-it#10651)

* geosolutions-it#10648: Issue editing multiple fields in MapStore Attribute Table
Description:
- edit in update wfs-t xml payload in case of multi-edit in each sigle row
- add unit test for 'savePendingFeatureGridChanges'

* geosolutions-it#10648: move 'createChangesTransaction' util function from epics/featuregrid to FeatureGridUtils file and a unit test is added for it.

* geosolutions-it#10648: handle unit test for 'savePendingFeatureGridChanges'

* geosolutions-it#10648: edit jsdoc for util 'createChangesTransaction'
@tdipisa tdipisa removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Nov 6, 2024
mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this issue Nov 6, 2024
mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this issue Nov 6, 2024
mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this issue Nov 6, 2024
MV88 pushed a commit that referenced this issue Nov 6, 2024
…pStore Attribute Table (#10654)

* #10648: fix FE tests failure for savePendingFeatureGridChanges

* #10648: remove unit test of  'savePendingFeatureGridChanges'
mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this issue Nov 6, 2024
…le fields in MapStore Attribute Table (geosolutions-it#10654)

* geosolutions-it#10648: fix FE tests failure for savePendingFeatureGridChanges

* geosolutions-it#10648: remove unit test of  'savePendingFeatureGridChanges'
MV88 pushed a commit that referenced this issue Nov 6, 2024
…tore Attribute Table (#10651) (#10653)

* #10648: Issue editing multiple fields in MapStore Attribute Table (#10651)

* #10648: Issue editing multiple fields in MapStore Attribute Table
Description:
- edit in update wfs-t xml payload in case of multi-edit in each sigle row
- add unit test for 'savePendingFeatureGridChanges'

* #10648: move 'createChangesTransaction' util function from epics/featuregrid to FeatureGridUtils file and a unit test is added for it.

* #10648: handle unit test for 'savePendingFeatureGridChanges'

* #10648: edit jsdoc for util 'createChangesTransaction'

* #10648: fix FE test failure for - Issue editing multiple fields in MapStore Attribute Table (#10654)

* #10648: fix FE tests failure for savePendingFeatureGridChanges

* #10648: remove unit test of  'savePendingFeatureGridChanges'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment