Opened 6 years ago

Last modified 6 years ago

#16495 closed defect

MapCss Validation lost tag on misconstructed fixAdd — at Version 1

Reported by: frodrigo Owned by: team
Priority: normal Milestone: 18.07
Component: Core validator Version:
Keywords: template_report Cc: nyurik, bastiK

Description (last modified by frodrigo)

What steps will reproduce the problem?

  1. Download object relation 8448338 (or any object with a tag wikipedia=NL:foo_bar
  2. Active the Wikipedia ruleset validator
  3. Validate
  4. Select the validation Warning about: Wikipedia page title should have spaces instead of underscores (_ )
  5. Choose the fix button

What is the expected result?

The wikipedia tag should be now wikipedia=NL:foo bar

What happens instead?

The wikipedia tag disappear.
Because of two issues:

  1. The validation rule is case insensitive

node[wikipedia =~ /(?i)[-a-z]{2,12}:.*_/][wikipedia !~ /(?i)[-a-z]{2,12}:https?:/] {

But the replacement is not

fixAdd: concat("wikipedia=", get(regexp_match("([-a-z]+:)(.+)$", tag("wikipedia")),1), trim(replace(get(regexp_match("([-a-z]+:)(.+)$", tag("wikipedia")),2), "_", " ")));

So the regexp_match match nothing, the two regexp_match should be fixed with "/(?i)..."

  1. JOSM simple lost the wikipedia tag

Please provide any additional information below. Attach a screenshot if possible.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-03-30 21:58:50 +0200 (Fri, 30 Mar 2018)
Build-Date:2018-03-31 01:32:18
Revision:13590
Redirecting:to URL 'https://josm.openstreetmap.de/svn/trunk':
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13590 fr) Linux Arch Linux
Memory Usage: 809 MB / 1749 MB (578 MB allocated, but free)
Java version: 1.8.0_172-b11, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-Djosm.restart=true]
Dataset consistency test: No problems found

Plugins:
+ Mapillary (v1.5.12+pre13643)
+ OpeningHoursEditor (34095)
+ PicLayer (34170)
+ apache-commons (34109)
+ apache-http (34109)
+ buildings_tools (34109)
+ conflation (0.5.9)
+ contourmerge (1032)
+ ejml (34126)
+ epci-fr (34095)
+ geotools (34125)
+ jts (34038)
+ log4j (34038)
+ pbf (34109)
+ poly (34098)
+ reverter (34109)
+ tag2link (34109)
+ tageditor (34109)
+ turnlanes (34146)
+ turnlanes-tagging (263)
+ undelete (34109)
+ utilsplugin2 (34263)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&zip=1

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Cycleways&style&zip=1
- https://github.com/hotosm/HDM-JOSM-style/archive/master.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features_ryg&zip=1

Validator rules:
+ https://github.com/Jungle-Bus/transport_mapcss/raw/i18n_tofix/transport.validator.zip

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.

Change History (1)

comment:1 by frodrigo, 6 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.