Modify

Opened 3 years ago

Last modified 3 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 Don-vip)

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

Attachments (0)

Change History (8)

comment:1 by Don-vip, 3 years ago

Description: modified (diff)

comment:2 by Don-vip, 3 years ago

Milestone: 21.02
Owner: changed from team to Don-vip
Status: newassigned

comment:3 by Don-vip, 3 years ago

Resolution: fixed
Status: assignedclosed

In 17497/josm:

fix #20498 - make sure fixChangeKey does not overwrite existing tag

comment:4 by Don-vip, 3 years ago

Milestone: 21.02
Resolution: fixed
Status: closedreopened

comment:5 by Don-vip, 3 years ago

Owner: changed from Don-vip to team
Status: reopenednew

comment:6 by Don-vip, 3 years ago

In 17499/josm:

see #20498 - see #10913 - partial revert of r17497, breaks other use cases

comment:7 by Don-vip, 3 years ago

The fix I made breaks #10913 use case. I don't know how to fix both cases.

comment:8 by mkoniecz, 3 years ago

Have fixChangeKey and fixChangeKeyWithOverwrite ? (or better named versions)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to mkoniecz.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.