when changing presets, delete keys from the old preset which are not in the new preset#11696
when changing presets, delete keys from the old preset which are not in the new preset#11696
Conversation
Is this part in the code already? |
yeah, right now iD doesn't delete any fields when changing presets. So the only change is to the 4th bullet point. |
|
If we release this, we should look into adding a recommendation in the docs (probably schema builder) to hint at other apps that this is the common handling of this case. (Note to self) |
There was a problem hiding this comment.
This sounds like the most sensible thing do do.
I noticed that none of the tests seems to cover the case for a tag which does not exist in either preset… Shall we maybe add a test for that case while we're at it? //edit: added this in 6f92a29
8b1ba29 to
354475b
Compare
...which are not in the new preset
354475b to
9d2de18
Compare
|
how it does it? https://github.com/openstreetmap/id-tagging-schema/blob/93113eccdddcedb502d951dc206c7add951b1d68/data/presets/golf/lateral_water_hazard.json#L4 does not have When migrating from say https://github.com/openstreetmap/id-tagging-schema/blob/93113eccdddcedb502d951dc206c7add951b1d68/data/presets/natural/water/pond.json#L15 |
If we add a field for So it requires a change in this repo and iD-tagging-schema to fully fix that issue |
|
I expected that openstreetmap/id-tagging-schema#951 would be also fixed, but it still requires fiddling with paths. |
I wonder whether it also should be partially used to purge things like |
Previously discussed at openstreetmap/id-tagging-schema#1622 (comment)
Currently, if you change
building=yes+building:levels=5tolanduse=grass, then the grass will still havebuilding:levels, which is a bit weird.There are endless examples like this. This topic has been discussed many times in different PRs.
removeTagscan solve this, but it's not clear when we should useremoveTags.New logic:
name,check_dataare always keptref:FR:some_random_tagremoveTags