Modify

Opened 5 years ago

Closed 4 years ago

Last modified 18 months 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 4 years ago.
example file

Download all attachments as: .zip

Change History (23)

comment:1 Changed 5 years ago by Don-vip

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 Changed 5 years ago by Klumbumbus

OK, I didn't know that.

comment:3 Changed 5 years ago by mkoniecz

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

comment:4 Changed 5 years ago by skyper

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

comment:5 in reply to:  4 Changed 5 years ago by skyper

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 Changed 4 years ago by Klumbumbus

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 Changed 4 years ago by Klumbumbus

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

comment:8 in reply to:  6 ; Changed 4 years ago by 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.

  • 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 4 years ago by stoecker (previous) (diff)

comment:9 in reply to:  8 Changed 4 years ago by Klumbumbus

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 Changed 4 years ago by stoecker

In 8178/josm:

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

comment:11 Changed 4 years ago by stoecker

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

comment:12 Changed 4 years ago by stoecker

In 8179/josm:

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

comment:13 Changed 4 years ago by Don-vip

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

comment:14 Changed 4 years ago by stoecker

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

comment:15 Changed 4 years ago by Klumbumbus

In 8184/josm:

see #10329 - add warnings for color

comment:16 Changed 4 years ago by stoecker

Resolution: fixed
Status: reopenedclosed

comment:17 Changed 4 years ago by Klumbumbus

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 Changed 4 years ago by stoecker

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 Changed 4 years ago by Klumbumbus

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.

Changed 4 years ago by skyper

Attachment: color.osm added

example file

comment:20 Changed 4 years ago by skyper

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 Changed 4 years ago by Klumbumbus

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 Changed 18 months ago by Don-vip

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.