Modify

Opened 4 years ago

Last modified 8 months ago

#13651 new defect

conditional tag: False warning with complex opening_hours values in combination with AND

Reported by: skyper Owned by: team
Priority: normal Milestone:
Component: Core validator Version: latest
Keywords: template_report conditional tag Cc:

Description

What steps will reproduce the problem?

I have a quite complex access restriction downtown with special times for special transport types. According to Conditional_restrictions#Condition I need an extra pair of brackets to group an opening_hours value including a semicolon but validator does not like it:

vehicle:conditional=delivery @ ((05:00-10:30,19:00-22:00; Sa 05:00-09:30,19:00-22:00) AND weight<7.5)

I get Error in vehicle:conditional value: Does not match pattern 'restriction value @ condition'.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-09-16 13:38:58 +0200 (Fri, 16 Sep 2016)
Build-Date:2016-09-17 01:40:40
Revision:11005
Relative:URL: ^/trunk

Identification: JOSM/1.5 (11005 en) Linux Debian GNU/Linux 8.5 (jessie)
Memory Usage: 549 MB / 882 MB (383 MB allocated, but free)
Java version: 1.8.0_102-8u102-b14.1-1~bpo8+1-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-8-jre:amd64-8u102-b14.1-1~bpo8+1
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-9
VM arguments: [-Djosm.home=<josm.pref>]
Program arguments: [--language=en]
Dataset consistency test: No problems found

Plugins:
+ reverter (32796)
+ undelete
+ utilsplugin2 (32815)

Last errors/warnings:
- W: Invalid jar file ''<josm.pref>/plugins/utilsplugin2.jar.new'' (exists: false, canRead: false)
- W: Invalid jar file ''<josm.pref>/plugins/reverter.jar.new'' (exists: false, canRead: false)
- W: Invalid jar file ''<josm.pref>/plugins/undelete.jar.new'' (exists: false, canRead: false)

Attachments (0)

Change History (1)

comment:1 Changed 8 months ago by skyper

Still a problem. The wiki says:

  • Time and date: Conditions

    Time and date: Use the standard syntax of the value * of the opening_hours=* tag. If that value includes semicolons (";"), that condition must be enclosed by round brackets (parentheses), e.g. (Mo 06:00-24:00; Tu-Fr 00:00-24:00; Sa 00:00-13:00), Mo-Fr 07:00-19:00, sunrise-sunset or Jan-Mar.

  • AND

    Two or more partial conditions may be combined using the operator AND. It is recommended to use the uppercase form to improve readability. AND means that both partial conditions must be fulfilled for the condition to apply. Example access:conditional=destination @ (Sa-Su AND weight>7).

    And all examples with AND show the use of round brackets.

Well, there are situations where more than one round bracket is needed and JOSM should not warn about perfectly correct values of a complex tag. Thanks.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-07-06 23:02:10 +0200 (Mon, 06 Jul 2020)
Revision:16738
Build-Date:2020-07-07 01:30:48
URL:https://josm.openstreetmap.de/svn/trunk

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to skyper
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


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

 
Note: See TracTickets for help on using tickets.