Opened 6 years ago
Last modified 6 years ago
#15726 new enhancement
Not returning the value when using tag()
Reported by: | naoliv | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core validator | Version: | |
Keywords: | mapcss | Cc: |
Description
Have this small validation rule:
*[foo = bar] { throwWarning: tr("something {0}={1}", "{0.key}", tag("{0.key}")); }
and validate an object with foo=bar
We can see a message saying something foo=null
Of course the common usage is {0.value}
instead tag("{0.key}")
, but since tag(key_name)
description says "get the value of the key key_name from the object in question", shouldn't we see the same result regardless which one we choose here?
JOSM:
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2018-01-02 00:31:23 +0100 (Tue, 02 Jan 2018) Revision:13271 Build-Date:2018-01-02 02:33:50 URL:http://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (13271 pt_BR) Linux Debian GNU/Linux unstable (sid) Memory Usage: 576 MB / 5120 MB (173 MB allocated, but free) Java version: 9.0.1+11-Debian-1, Oracle Corporation, OpenJDK 64-Bit Server VM Screen: :0.0 1920x1080 Maximum Screen Size: 1920x1080 Java package: openjdk-9-jre:amd64-9.0.1+11-1 Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-13 VM arguments: [--illegal-access=warn, --add-modules=java.se.ee, -Dawt.useSystemAAFontSettings=on] Dataset consistency test: No problems found
Attachments (0)
Change History (3)
comment:3 by , 6 years ago
Type: | defect → enhancement |
---|
more like an enhancement than a defect, see ticket:15719#comment:4
for now it works with examples similar to ticket:15719#comment:2 or r12215 or r13345
As a real example (and for context), I was trying to test some rules for #15719:
But it deletes the key (since the value is null)