Opened 5 years ago
Last modified 5 years ago
#20498 new enhancement
fixChangeKey is proposing autofix when data may be erased
| Reported by: | mkoniecz | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core validator | Version: | |
| Keywords: | template_report | Cc: |
Description (last modified by )
What steps will reproduce the problem?
Have
*[waterway=water_point] { throwWarning: tr("{0} is deprecated", "{0.tag}"); suggestAlternative: "amenity=water_point"; group: tr("deprecated tagging"); fixChangeKey: "waterway => amenity"; }
validator rule (present in default JOSM)
2.
Create amenity=prison waterway=water_point point
- Run validator.
- Select autofix
What is the expected result?
Autofix is not available
What happens instead?
We got amenity=water_point point
Workaround would be to have two rules -
(a) that autofixes and skips element with nonmatching target tag (waterway=water_point amenity=water_point is a valid target).
(b) second that just warns
But maybe it would be better to change fixChangeKey behavior?
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-01-21 23:33:21 +0100 (Thu, 21 Jan 2021)
Revision:17474
Build-Date:2021-01-22 02:30:49
URL:https://josm.openstreetmap.de/svn/trunk
Identification: JOSM/1.5 (17474 en) Linux Ubuntu 20.04.2 LTS
Memory Usage: 1007 MB / 3974 MB (215 MB allocated, but free)
Java version: 11.0.10+9-Ubuntu-0ubuntu1.20.04, Ubuntu, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→16×16, 32×32→32×32
Desktop environment: LXQt
Java package: openjdk-11-jre:amd64-11.0.10+9-0ubuntu1~20.04
Java ATK Wrapper package: libatk-wrapper-java:all-0.37.1-1
Environment variable LANG: en_US.UTF-8
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:-
Dataset consistency test: No problems found
Plugins:
+ buildings_tools (35669)
+ reverter (35688)
+ todo (30306)
Validator rules:
+ https://josm.openstreetmap.de/josmfile?page=Rules/OSMLint&zip=1
+ ${HOME}/Documents/install_moje/OSM software/manual editing and discussions/josm/resources/data/validator/deprecated.mapcss
Attachments (0)
Change History (8)
comment:1 by , 5 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 5 years ago
| Milestone: | → 21.02 |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:3 by , 5 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:4 by , 5 years ago
| Milestone: | 21.02 |
|---|---|
| Resolution: | fixed |
| Status: | closed → reopened |
comment:5 by , 5 years ago
| Owner: | changed from to |
|---|---|
| Status: | reopened → new |
comment:7 by , 5 years ago
The fix I made breaks #10913 use case. I don't know how to fix both cases.
comment:8 by , 5 years ago
Have fixChangeKey and fixChangeKeyWithOverwrite ? (or better named versions)



In 17497/josm: