Modify

Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#9412 closed defect (fixed)

Wrong fix for building=entrance validation

Reported by: naoliv Owned by: Don-vip
Priority: normal Milestone: 13.12
Component: Core validator Version:
Keywords: template_report Cc:

Description

Have a node tagged with building=entrance, run the validator and then apply the fix.
It wrongly gets "fixed" to entrance=entrance (should be an entrance=yes)

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2013-12-09 02:35:16
Last Changed Author: Don-vip
Revision: 6458
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2013-12-09 01:53:04 +0100 (Mon, 09 Dec 2013)
Last Changed Rev: 6458

Identification: JOSM/1.5 (6458 pt_BR) Linux Debian GNU/Linux unstable (sid)
Memory Usage: 855 MB / 1756 MB (373 MB allocated, but free)
Java version: 1.7.0_25, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u25-2.3.12-4
VM arguments: [-Djava.net.useSystemProxies=true, -Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems found

Plugin: AddrInterpolation (30034)
Plugin: Create_grid_of_ways (29854)
Plugin: ImageryCache (29946)
Plugin: OpeningHoursEditor (30117)
Plugin: PicLayer (29854)
Plugin: SimplifyArea (30017)
Plugin: buildings_tools (30057)
Plugin: editgpx (29854)
Plugin: geotools (29767)
Plugin: jts (29854)
Plugin: merge-overlap (30034)
Plugin: notes (v0.7)
Plugin: opendata (30097)
Plugin: pdfimport (29913)
Plugin: reverter (30031)
Plugin: tagging-preset-tester (30017)
Plugin: turnrestrictions (30110)
Plugin: undelete (29854)
Plugin: utilsplugin2 (30017)

Attachments (0)

Change History (7)

comment:1 by simon04, 10 years ago

Owner: changed from team to Don-vip

This seems to be a regression from r6329 and also affects the tests and lead to undesired tag combinations.

        checks.add(new DeprecationCheck(2104).
                test("class").
                alternative("highway"));
        checks.add(new DeprecationCheck(2112).
                test("power_source").
                alternative("generator:source"));
        checks.add(new DeprecationCheck(2113).
                test("power_rating").
                alternative("generator:output"));
        checks.add(new DeprecationCheck(2123).
                test("building", "entrance").
                alternative("entrance"));

@Don-vip: The idea behind those alternatives is to let the user fix this tag since no automatic fix can be determined, e.g., building=entranceentrance=yes or entrance=main or others. I'd suggest to drop the fix on alternatives and add a separate method for key changes, e.g.

        checks.add(new DeprecationCheck(2129).
                test("monitoring:river_level").
                changeKey("monitoring:river_level", "monitoring:water_level"));

What do you think?

comment:2 by Don-vip, 10 years ago

Woops, ok :)
Agreed with you on the solution, but I think we could keep a simpler form like this:

        checks.add(new DeprecationCheck(2129).
                test("monitoring:river_level").
                changeKey("monitoring:water_level"));

-> If there's a single test and a single changeKey, assume changeKey replaces the key tested previously. But the syntax you propose is OK too if we need a check that replaces several keys.

Can you also add some javadoc ? :)

comment:3 by simon04, 10 years ago

Resolution: fixed
Status: newclosed

In 6465/josm:

fix #9412 - wrong fix for building=entrance validation

comment:4 by Don-vip, 10 years ago

Thank you Simon ! :)

comment:5 by simon04, 10 years ago

You're welcome! :-)

comment:6 by Don-vip, 10 years ago

Milestone: 13.12 (6502)

comment:7 by stoecker, 7 years ago

Milestone: 13.12 (6502)13.12

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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