Modify

Opened 10 years ago

Closed 8 years ago

#7157 closed defect (duplicate)

upload errors when a relations whith parent relation is deleted

Reported by: mdk Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc: rayquaza

Description

JOSM did't download parent relations (anymore?).
If a relation is deleted which is member of a parent relation, the upload failed, because the parent relation still refers to the deleted relation.
The solution could be: when a relation should be deleted, JOSM must first try to download the parent relations before deleing the child relation.

It takes me hours to upload my edits, because the only way to solve the problem was to modify the parent relation in a separate changeset, update the changes and solve the conflicts.

Attachments (0)

Change History (8)

comment:1 Changed 10 years ago by stoecker

Priority: blockernormal

comment:2 Changed 10 years ago by anonymous

The problem is, that every time you delete a relation which is member of an other relation, you will destroy your changeset! In my oppinion this is more than a "normal" error.

comment:3 Changed 10 years ago by stoecker

This issue is there for a long time when having partial datasets. JOSM has lots of features to get missing "parent" data. There is even a menu option to get that data. Anyway all this only affects a few experts. The majority does not download individual elements, but uses the map selection.

Did you get a proper hint what's wrong in the upload dialog or not? If not, then the upload handling of this error should be improved.

comment:4 Changed 10 years ago by mdk

On upload I get an error like (not the exact error message)
"Could not delete relation x, beause it is still used in relation y"

I was cleaning up old boundaries in Switzerland. There are boundary relation containing some ways, which must be deleted.

An existing example (which has to be deleted) is:
"Relation: Regensberg (108998)" which is member of "Relation: Bezirk Dielsdorf (149462)"

But while writing this I see the possible problem. I deleted all members of the parent relation and so I also delete the parent relation itself. In the above case the error would say: "can't delete 108998 because it is member of 149462". This could happend when the order of deletion on the server is 108998 and then 149462 (first deleting 149462 would work).

Normally a deletion of 108998 would cause an implicit update of 149462 removing the membership of 108998. And because Josm first sends inserts, then updates and then deletes to the server, there is no problem. But if also 149462 is deleted, I don't know which order JOSM decided to choose for delete both relations.

So a first solution is to sort the delete of relation from top to down: first delete relations, which are NOT member of an other relation which will also be deleted.

But an extreme case show, that sorting will not help in all cases: if r1 is member of r2 and r2 is member of r1

So deleting all relations which have circular references will be impossible in a single changeset. In this case we need first to update a relation excluding all members, and then delete the relations in the sorted way described above.

But luckily this is only necessary if circular relations are deleted. Today even circular relations could be deleted, if this happens in two changesets.

I hope you can fix it, and "normal" is ok, because deleting so much relations is not dayly business ;-)

Last edited 8 years ago by skyper (previous) (diff)

comment:5 Changed 8 years ago by Don-vip

Ticket #9429 has been marked as a duplicate of this ticket.

comment:6 Changed 8 years ago by Don-vip

Cc: rayquaza added

comment:7 Changed 8 years ago by malenki

See also: #9624 and #6373

comment:8 Changed 8 years ago by simon04

Resolution: duplicate
Status: newclosed

Closed as duplicate of #9624.
Closing this as duplicate of #9624 since #9624 already contains a patch …

Modify Ticket

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