Opened 13 years ago
Closed 11 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 by , 13 years ago
Priority: | blocker → normal |
---|
comment:2 by , 13 years ago
comment:3 by , 13 years ago
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 by , 13 years ago
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 ;-)
comment:6 by , 11 years ago
Cc: | added |
---|
comment:8 by , 11 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
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.