Modify

Opened 6 years ago

Closed 4 years ago

#16390 closed defect (fixed)

[Patch] Can't undelete/restore a node when changeset contains multiple versions of it

Reported by: naoliv Owned by: naoliv
Priority: normal Milestone:
Component: Plugin undelete Version:
Keywords: Cc:

Description

Try to undelete n246670505
We can't see any visible object after undeleting and, if trying to upload the data, we only see an incomplete node.

In the console I can't see any message (warning or error).
Some changesets where this node was modified were redacted but the node itself didn't have any kind of redaction https://www.openstreetmap.org/node/246670505/history

The info retrieved by the plugin seems all good too:

2018-06-14 09:16:24.169 INFORMAÇÕES: Undeleting [nó 246670505]
2018-06-14 09:16:24.881 INFORMAÇÕES: GET https://api.openstreetmap.org/api/0.6/node/246670505/history -> 200
2018-06-14 09:16:25.664 INFORMAÇÕES: GET https://api.openstreetmap.org/api/0.6/changesets?changesets=554280,73043 -> 200 (423 B)
$ GET https://api.openstreetmap.org/api/0.6/node/246670505/history
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="CGImap 0.6.0 (15409 thorn-01.openstreetmap.org)" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
 <node id="246670505" visible="true" version="1" changeset="73043" timestamp="2008-02-08T19:36:15Z" user="lmpinto" uid="7396" lat="-21.4722230" lon="-46.3961110">
  <tag k="created_by" v="JOSM"/>
  <tag k="name" v="Cabo Verde"/>
  <tag k="place" v="village"/>
  <tag k="source" v="geominas"/>
 </node>
 <node id="246670505" visible="false" version="2" changeset="554280" timestamp="2008-07-20T19:45:11Z" user="Eduardo Francis Batista" uid="45375">
  <tag k="created_by" v="JOSM"/>
  <tag k="name" v="Cabo Verde"/>
  <tag k="place" v="village"/>
  <tag k="source" v="geominas"/>
 </node>
 <node id="246670505" visible="false" version="3" changeset="554280" timestamp="2008-07-20T19:45:12Z" user="Eduardo Francis Batista" uid="45375">
  <tag k="created_by" v="JOSM"/>
  <tag k="name" v="Cabo Verde"/>
  <tag k="place" v="village"/>
  <tag k="source" v="geominas"/>
 </node>
</osm>
$ GET "https://api.openstreetmap.org/api/0.6/changesets?changesets=554280,73043" 
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="OpenStreetMap server" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
  <changeset id="554280" user="Eduardo Francis Batista" uid="45375" created_at="2008-07-20T19:04:37Z" closed_at="2008-07-20T22:16:06Z" open="false" min_lat="-21.6213932" min_lon="-46.6311939" max_lat="-21.3758294" max_lon="-46.1958353" comments_count="0"/>
  <changeset id="73043" user="lmpinto" uid="7396" created_at="2008-02-08T18:49:13Z" closed_at="2008-02-08T20:50:51Z" open="false" min_lat="-22.9170000" min_lon="-51.0626000" max_lat="-14.2373000" max_lon="-39.8572000" comments_count="0"/>
</osm>

JOSM:

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-06-13 23:37:59 +0200 (Wed, 13 Jun 2018)
Revision:13929
Build-Date:2018-06-13 21:48:50
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (13929 pt_BR) Linux Debian GNU/Linux testing (buster)
Memory Usage: 516 MB / 7168 MB (218 MB allocated, but free)
Java version: 10.0.1+10-Debian-4, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1600x900, :0.1 1280x1024
Maximum Screen Size: 1600x1024
Java package: openjdk-10-jre:amd64-10.0.1+10-4
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-21
VM arguments: [--add-modules=java.activation,java.se.ee, -Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems found

Plugins:
+ ImportImagePlugin (34219)
+ OpeningHoursEditor (34095)
+ PicLayer (34170)
+ SimplifyArea (34109)
+ apache-commons (34109)
+ buildings_tools (34212)
+ download_along (34081)
+ editgpx (34109)
+ ejml (34126)
+ geojson (80)
+ geotools (34125)
+ jts (34038)
+ log4j (34038)
+ measurement (34109)
+ opendata (34196)
+ pbf (34109)
+ poly (34098)
+ reverter (34271)
+ scripting (30785)
+ tageditor (34109)
+ todo (30304)
+ turnlanes-tagging (263)
+ turnrestrictions (34129)
+ undelete (34274)
+ utilsplugin2 (34286)
+ wikipedia (v1.0.1)

Attachments (1)

16390.patch (1.1 KB ) - added by GerdP 5 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by GerdP, 5 years ago

version 2 and final version 3 appear both in the same changeset. Therefore the current version of the undelete plugin restores the node without coordinates. You can find it when you activate the "all objects" select box in the search dialog.
Question is if makes sense to restore that version. If not, would we try to restore the latest version with coordinates?

by GerdP, 5 years ago

Attachment: 16390.patch added

comment:2 by GerdP, 5 years ago

Owner: changed from team to naoliv
Status: newneedinfo
Summary: Can't undelete/restore a node[Patch] Can't undelete/restore a node

With the attached patch JOSM doesn't restore a node without coordinates. I am not sure if I should commit it as is.
It might mean that nothing is restored if all older versions are redacted. On the other hand, since ticket:9860#comment:2 there might be no more need to fix this?

comment:3 by GerdP, 4 years ago

Resolution: fixed
Status: needinfoclosed
Summary: [Patch] Can't undelete/restore a node[Patch] Can't undelete/restore a node when changeset contains multiple versions of it

see [o35396:35397]

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain naoliv.
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.