Opened 7 months ago

Closed 4 weeks ago

Last modified 4 weeks 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:


What steps will reproduce the problem?

  1. open josm without any layer
  2. open
  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

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
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-
WebStart package: icedtea-web:x86_64-1.7.1
VM arguments: [, -Dicedtea-web.bin.location=/usr/bin/javaws.itweb]
Dataset consistency test: No problems found

+ 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<>

Map paint styles:

Attachments (0)

Change History (9)

comment:1 Changed 7 months ago by Don-vip

2020-10-01 02:34:51.976 INFO: RemoteControl received: GET /import?url= HTTP/1.1
2020-10-01 02:34:52.052 INFO: GET -> 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=" - 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"/>

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=' - 01/2020' />

comment:2 Changed 7 months ago by Don-vip

Keywords: osmose added

comment:3 Changed 4 weeks ago by simon04

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

Done, but not working.

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

comment:4 Changed 4 weeks ago by marc_marc

test with
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 Changed 4 weeks ago by simon04

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.


editLayer.requiresUploadToServer() is false -- org.openstreetmap.josm.gui.layer.OsmDataLayer#setRequiresUploadToServer is never called
	at org.openstreetmap.josm.actions.UploadAction.updateEnabledState(
	at org.openstreetmap.josm.actions.JosmAction$LayerChangeAdapter.layerAdded(
	at org.openstreetmap.josm.actions.AbstractUploadAction$1.layerAdded(
	at org.openstreetmap.josm.gui.layer.LayerManager.fireLayerAdded(
	at org.openstreetmap.josm.gui.layer.LayerManager.realAddLayer(
	at org.openstreetmap.josm.gui.layer.MainLayerManager.realAddLayer(
	at org.openstreetmap.josm.gui.layer.LayerManager.lambda$addLayer$0(
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(
	at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$AbstractInternalTask.addNewLayerIfRequired(
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$AbstractInternalTask.loadData(
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.finish(

comment:6 Changed 4 weeks ago by simon04

Resolution: fixed
Status: assignedclosed

In 17603/josm:

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

comment:7 Changed 4 weeks ago by simon04

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

comment:8 Changed 4 weeks ago by marc_marc

thanks for the fix !

comment:9 Changed 4 weeks ago by simon04

You're welcome... :-)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.