Modify

Opened 10 years ago

Closed 6 years ago

#11985 closed enhancement (worksforme)

Support {0}.key/tag/value when comparing key values

Reported by: naoliv Owned by: team
Priority: normal Milestone:
Component: Core validator Version:
Keywords: mapcss Cc:

Description

When using a test like this:

*["contact:phone" = *phone],
*["contact:fax" = *fax],
*["contact:website" = *website],
*["contact:email" = *email],
*["contact:facebook" = *facebook]
*["contact:twitter" = *twitter] {
        throwWarning: tr("{0} and {1} are the same", "{0.key}", "{1.key}");
}

we can see, for example, a warning with a null value: contact:phone and null are the same (even when using 1.tag or 1.value)

Could JOSM support key/tag/value for cases like this, please?

JOSM:

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2015-10-15 01:32:10
Last Changed Author: Don-vip
Revision: 8882
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2015-10-15 01:02:36 +0200 (Thu, 15 Oct 2015)
Last Changed Rev: 8882

Identification: JOSM/1.5 (8882 pt_BR) Linux Debian GNU/Linux unstable (sid)
Memory Usage: 554 MB / 3641 MB (337 MB allocated, but free)
Java version: 1.7.0_85, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u85-2.6.1-5
VM arguments: [-Dawt.useSystemAAFontSettings=on, -Dsun.java2d.opengl=true]
Dataset consistency test: No problems found

Attachments (0)

Change History (2)

comment:1 by naoliv, 10 years ago

Component: CoreCore validator

comment:2 by Don-vip, 6 years ago

Resolution: worksforme
Status: newclosed

For this specific case you must use {0.value}:

*["contact:phone" = *phone],
*["contact:fax" = *fax],
*["contact:website" = *website],
*["contact:email" = *email],
*["contact:facebook" = *facebook]
*["contact:twitter" = *twitter] {
        throwWarning: tr("{0} and {1} are the same", "{0.key}", "{0.value}");
}

It would be too complex to change the underlying mechanism.

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.