Modify

Opened 10 years ago

Closed 9 years ago

Last modified 6 years ago

#10329 closed enhancement (fixed)

give warning for color=*

Reported by: Klumbumbus Owned by: team
Priority: normal Milestone: 15.04
Component: Core validator Version:
Keywords: color, colour Cc:

Description

JOSM validator should warn about color=* since colour=* is the correct key.

see

Attachments (1)

color.osm (971 bytes ) - added by skyper 9 years ago.
example file

Download all attachments as: .zip

Change History (23)

comment:1 by Don-vip, 10 years ago

Resolution: worksforme
Status: newclosed

We already have an automatic correction on upload, I don't think this is worth a new manual test:

    public FixDataHook () {
        deprecated.add(new FixDataKey("color",            "colour"));
        deprecated.add(new FixDataTag("highway", "ford",  "ford",    "yes"));
        deprecated.add(new FixDataTag("oneway",  "false", "oneway",  "no"));
        deprecated.add(new FixDataTag("oneway",  "0",     "oneway",  "no"));
        deprecated.add(new FixDataTag("oneway",  "true",  "oneway",  "yes"));
        deprecated.add(new FixDataTag("oneway",  "1",     "oneway",  "yes"));
        deprecated.add(new FixDataTag("highway", "stile", "barrier", "stile"));

comment:2 by Klumbumbus, 10 years ago

OK, I didn't know that.

comment:3 by mkoniecz, 10 years ago

Data correction - is it applied to all objects or just modified ones? In the second case validator test still would be useful.

comment:4 by skyper, 10 years ago

color is not delete if colour with the same value does already exist.

in reply to:  4 comment:5 by skyper, 10 years ago

Replying to skyper:

color is not delete if colour with the same value does already exist.

Is it possible to delete it silently in this case ?

comment:6 by Klumbumbus, 9 years ago

Milestone: 15.04
Resolution: worksforme
Status: closedreopened

The situation around color is not satisfying.

  • If you add color it silently adds colour on upload but keeps color.
  • If you modify and upload an object with value of color = value of colour nothing happens.
  • No warnings if you manually run the validator.

comment:7 by Klumbumbus, 9 years ago

Also I would not use a silent autofix for color, since the user does not learn from his mistakes.

in reply to:  6 ; comment:8 by stoecker, 9 years ago

Replying to Klumbumbus:

The situation around color is not satisfying.

  • If you add color it silently adds colour on upload but keeps color.

That should not be the case. color is changed into colour, not added.

  • If you modify and upload an object with value of color = value of colour nothing happens.
  • No warnings if you manually run the validator.

You can add proper validator warnings. The silent change is there, as this is an error we introduced with JOSM presets.

Last edited 9 years ago by stoecker (previous) (diff)

in reply to:  8 comment:9 by Klumbumbus, 9 years ago

Replying to stoecker:

Replying to Klumbumbus:

The situation around color is not satisfying.

  • If you add color it silently adds colour on upload but keeps color.

That should not be the case. color is changed into colour, not added.

Happend to me, that I added color, the upload seemed fine and the result is http://www.openstreetmap.org/way/203410463.

Thanks to Osmose I noticed this.

comment:10 by stoecker, 9 years ago

In 8178/josm:

see #10329 - fix wrong upload fix and remove wrong old keys when new key has same value

comment:11 by stoecker, 9 years ago

Uih, an error in the fixing code is not nice.

comment:12 by stoecker, 9 years ago

In 8179/josm:

see #10329 - also drop old value for FixDataTag, when new value matches

comment:13 by Don-vip, 9 years ago

My fault I think. Can you check #10816 is still solved?

comment:14 by stoecker, 9 years ago

Don't see that this may have caused the problem. I think the issue is there from the very beginning.

comment:15 by Klumbumbus, 9 years ago

In 8184/josm:

see #10329 - add warnings for color

comment:16 by stoecker, 9 years ago

Resolution: fixed
Status: reopenedclosed

comment:17 by Klumbumbus, 9 years ago

Resolution: fixed
Status: closedreopened

If you change and try to upload an object with colour=red and color=red, then first the validator warning appears and then the autoremove applies. The same if you add a new object with color. Can this be changed, so first the autofixes take place and then the validator runs? This way the validator warnings will not appear, because the autofix repairs it before.

comment:18 by stoecker, 9 years ago

Resolution: fixed
Status: reopenedclosed

Your change would bring previous state back. Silent change without warning. Can be simply reached by removing the checks :-)

I think current way is right. User gets warned and can fix it. If he does not, the silent changes kick in.

comment:19 by Klumbumbus, 9 years ago

The difference would be that you get warnings when running the validator manually on the whole data set, not only modified objects on upload. However we can keep the current situation.

by skyper, 9 years ago

Attachment: color.osm added

example file

comment:20 by skyper, 9 years ago

Resolution: fixed
Status: closedreopened

There exist some combinations with color see taginfo and my example file.

Can we have a warning about any color:, :color and :color:. Thanks.

comment:21 by Klumbumbus, 9 years ago

Resolution: fixed
Status: reopenedclosed

In 8204/josm:

see #11245 - remove controversial clothes tag; fix #10329 - improve color validator warning; fix #11330 - improve uncommon short key validator warning; fix #11344 - add validator warning for 'tower|pole=air_to_ground'

comment:22 by Don-vip, 6 years ago

Follow-up: #15877

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.