Opened 9 years ago

Closed 8 years ago

#3047 closed defect (fixed)

Standardise storage of information upon deletion of object

Reported by: dankarran Owned by: Tom Hughes
Priority: minor Milestone:
Component: api Version:
Keywords: ways, delete Cc:

Description

When deleting a way, the tags are removed from the latest version of the way when viewing it through the data browser. Ways should keep their latest set of tags when the object is deleted, as nodes do.

I tested this in Potlatch[1] but it also seems to be happening with JOSM[2] so it seems like it may be an issue with the API.

[1] http://www.openstreetmap.org/browse/way/25989238/history [2] http://www.openstreetmap.org/browse/way/27880764/history

Change History (8)

comment:1 Changed 9 years ago by Tom Hughes

Personally I'd say the node behaviour is wrong - if the object doesn't exist any more why should it have any tags?

comment:2 Changed 9 years ago by Dan Karran

Yeah, I wasn't sure which behaviour was right (or prefered) here either. To me though, the last object should preserve its metadata along with the deleted flag. It would show the state it was in when it was deleted.

The reason I noticed it is that when you delete a way, nothing about that way (in particular, its name) shows up in the changeset browser, so things can get deleted without people being able to see that at a glance, which is pretty bad when monitoring changes in an area.

Personally, I'm convinced those details should be kept on the last version of an object. That said, I am undecided on whether the constituent nodes of a way should be kept or not. Part of me thinks they should, part of me doesn't care :)

I checked out the code, and to 'fix' this would be a one line change in the way model, but it all depends on what the concensus is.

comment:3 Changed 9 years ago by Dan Karran

If we were to make this change ([patch http://github.com/dankarran/openstreetmap-website/commit/f04976db93cb6ee5887a7a78954324bccea4bc8e]), should we also go back through all deleted ways and add the tags into the latest version for consistency, or just make it have effect from that point onwards?

Either way, do you know if this change would have any effect on other parts of the rails port, or on apps that are using the data?

comment:4 Changed 9 years ago by LarsF

I don't really have an opinion on this but don't forget the relations in case you decide to keep tags. They seem to lose their tags as well.

comment:5 Changed 9 years ago by Andy Allan

I don't think we should conflate two issues here - it would be fairly easy to make the data browser or changeset browser display version n-1 if we want to show the tags.

I don't think they should have the tags on the deleted object, since it's deleted. It makes little sense to say that it's a deleted pub, for example, but it makes sense to say it's a deleted node, and just before it was deleted it was a pub.

comment:6 Changed 9 years ago by matthias@…

Keeping all properties, tags and members would make it a little bit easier to "undelete" objects without having to look up the history.

comment:7 Changed 9 years ago by Dan Karran

Summary: Keep tags on latest version when deleting waysStandardise storage of information upon deletion of object

Andy, that's a good point. I came at this from the angle of wanting to see the latest relevant information after an object had been deleted. The actual last state doesn't matter too much to me, as long as we can display the latest relevant information in the browser.

comment:8 Changed 8 years ago by Tom Hughes

Resolution: fixed
Status: newclosed

I changed this a couple of months ago, so the tags are now removed from a deleted node in the database.

Note: See TracTickets for help on using tickets.