Opened 3 years ago

Last modified 3 years ago

#20498 new enhancement

fixChangeKey is proposing autofix when data may be erased — at Initial Version

Reported by: mkoniecz Owned by: team
Priority: normal Milestone:
Component: Core validator Version:
Keywords: template_report Cc:

Description

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

  1. Run validator.
  1. 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

Change History (0)

Note: See TracTickets for help on using tickets.