Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#19816 closed defect (fixed)

remote cmd (osmose fix-josm) create a new object but produce a "nothing to upload" layer

Reported by: marc_marc Owned by: simon04
Priority: normal Milestone: 21.03
Component: Core remotecontrol Version:
Keywords: template_report osmose downloaded_layer requires_upload modified Cc:

Description

What steps will reproduce the problem?

  1. open josm without any layer
  2. open https://osmose.openstreetmap.fr/fr/map/#item=8410&zoom=18&lat=47.053933&lon=-0.185255&level=1%2C2%2C3
  3. clic on the marker
  4. clic on the fix-josm
  5. in josm, the new node is well present in the layer

What is the expected result?

the upload button should be green and allow to upload change to osm.

What happens instead?

the upload button remains gray as if the layer did not contain any data to send to osm.

Please provide any additional information below. Attach a screenshot if possible.

related osmose ticket https://github.com/osm-fr/osmose-frontend/issues/276

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-09-06 16:54:59 +0200 (Sun, 06 Sep 2020)
Build-Date:2020-09-07 01:30:48
Revision:17013
Relative:URL: ^/trunk

Identification: JOSM/1.5 (17013 fr) Linux CentOS Linux release 7.8.2003 (Core)
Memory Usage: 350 MB / 1820 MB (49 MB allocated, but free)
Java version: 1.8.0_262-b10, Oracle Corporation, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1600x900 (scaling 1.0x1.0)
Maximum Screen Size: 1600x900
Best cursor sizes: 16x16 -> 16x16, 32x32 -> 32x32
Desktop environment: GNOME-Classic:GNOME
Java package: java-1.8.0-openjdk:x86_64-1.8.0.262.b10
WebStart package: icedtea-web:x86_64-1.7.1
VM arguments: [-Dicedtea-web.bin.name=javaws.itweb, -Dicedtea-web.bin.location=/usr/bin/javaws.itweb]
Dataset consistency test: No problems found

Plugins:
+ Mapillary (1.5.25)
+ apache-commons (35524)
+ apache-http (35092)
+ areaselector (368)
+ austriaaddresshelper (1597341117)
+ cadastre-fr (35539)
+ conflation (0.6.6)
+ continuosDownload (91)
+ ejml (35313)
+ geotools (35169)
+ javafx-unixoid (35458)
+ jaxb (35092)
+ jna (35092)
+ jts (35122)
+ log4j (35092)
+ opendata (35513)
+ pt_assistant (2.1.10-80-g7d9bba3)
+ reverter (35499)
+ scripting (30798)
+ todo (30306)
+ utilsplugin2 (35487)
+ wikipedia (1.1.4)

Tagging presets:
+ https://raw.github<user.name>content.com/osmlab/name-suggestion-index/master/dist/name-suggestions.presets.xml

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Landcover&zip=1

Attachments (0)

Change History (9)

comment:1 by Don-vip, 4 years ago

2020-10-01 02:34:51.976 INFO: RemoteControl received: GET /import?url=http://osmose.openstreetmap.fr/api/0.3/issue/4a42da1a-e3a6-0dfc-8695-933b0e88b172/fix/0 HTTP/1.1
2020-10-01 02:34:52.052 INFO: GET http://osmose.openstreetmap.fr/api/0.3/issue/4a42da1a-e3a6-0dfc-8695-933b0e88b172/fix/0 -> HTTP/1.1 200 (63 ms)

Osmose data:

<osm version="0.6">
  <node lon="-0.1854303" id="-1" lat="47.0539167">
    <tag k="operator" v="Séolis"/>
    <tag k="amenity" v="charging_station"/>
    <tag k="network" v="AlterBase"/>
    <tag k="capacity" v="2"/>
    <tag k="owner" v="Séolis"/>
    <tag k="ref:EU:EVSE" v="FRSEOPAB20087A"/>
    <tag k="opening_hours" v="24/7"/>
    <tag k="fee" v="yes"/>
    <tag k="source" v="data.gouv.fr:Etalab - 01/2020"/>
    <tag k="socket:type3c" v="1"/>
    <tag k="socket:type2" v="1"/>
    <tag k="socket:typee" v="2"/>
    <tag k="motorcar" v="yes"/>
  </node>
</osm>

Shouldn't the osmose file simply include action=modify?

  <node id='-101758' action='modify' visible='true' lat='47.05391319835' lon='-0.18542774921'>
    <tag k='amenity' v='charging_station' />
    <tag k='capacity' v='2' />
    <tag k='fee' v='yes' />
    <tag k='motorcar' v='yes' />
    <tag k='network' v='AlterBase' />
    <tag k='opening_hours' v='24/7' />
    <tag k='operator' v='Séolis' />
    <tag k='owner' v='Séolis' />
    <tag k='ref:EU:EVSE' v='FRSEOPAB20087A' />
    <tag k='socket:type2' v='1' />
    <tag k='socket:type3c' v='1' />
    <tag k='socket:typee' v='2' />
    <tag k='source' v='data.gouv.fr:Etalab - 01/2020' />
  </node>

comment:2 by Don-vip, 4 years ago

Keywords: osmose added

comment:3 by simon04, 4 years ago

https://github.com/osm-fr/osmose-frontend/issues/276#ref-commit-5fa80dd

Add action=modify for josm fix on object creation 276 · osm-fr/osmose-frontend@5fa80dd

https://github.com/osm-fr/osmose-frontend/issues/276#issuecomment-717534927

Done, but not working.


Testing comment:1 with action='modify' works for me. Is anything left to be done?

comment:4 by marc_marc, 4 years ago

test with https://osmose.openstreetmap.fr/fr/map/#item=8500&zoom=18&lat=47.203299&lon=6.83408
clic on fix-josm produce a nothing-to-upload layer (upload button disabled)
saving the layer show the objet as <node id='-1' action='modify' visible='true' lat='47.2033116' lon='6.8334311'>
merging this objet in a new empty layer produce a layer available to upload

comment:5 by simon04, 4 years ago

Keywords: downloaded_layer requires_upload modified added
Milestone: 21.03
Owner: changed from team to simon04
Status: newassigned

Thanks for the details.

The upload is possible only when a data layer was present before invoking the remote control command.


Related #18296.

Debugging:

editLayer.requiresUploadToServer() is false -- org.openstreetmap.josm.gui.layer.OsmDataLayer#setRequiresUploadToServer is never called
	at org.openstreetmap.josm.actions.UploadAction.updateEnabledState(UploadAction.java:152)
	at org.openstreetmap.josm.actions.JosmAction$LayerChangeAdapter.layerAdded(JosmAction.java:446)
	at org.openstreetmap.josm.actions.AbstractUploadAction$1.layerAdded(AbstractUploadAction.java:50)
	at org.openstreetmap.josm.gui.layer.LayerManager.fireLayerAdded(LayerManager.java:459)
	at org.openstreetmap.josm.gui.layer.LayerManager.realAddLayer(LayerManager.java:234)
	at org.openstreetmap.josm.gui.layer.MainLayerManager.realAddLayer(MainLayerManager.java:284)
	at org.openstreetmap.josm.gui.layer.LayerManager.lambda$addLayer$0(LayerManager.java:218)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:246)
	at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(LayerManager.java:218)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$AbstractInternalTask.addNewLayerIfRequired(DownloadOsmTask.java:356)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$AbstractInternalTask.loadData(DownloadOsmTask.java:363)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.finish(DownloadOsmTask.java:509)

comment:6 by simon04, 4 years ago

Resolution: fixed
Status: assignedclosed

In 17603/josm:

fix #19816 - DownloadOsmTask: mark newly downloaded layer with modifications as "requires upload"

comment:7 by simon04, 4 years ago

After debugging for one hour, I only had to swap two lines of code...

comment:8 by marc_marc, 4 years ago

thanks for the fix !

comment:9 by simon04, 4 years ago

You're welcome... :-)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.