Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#16208 closed defect (worksforme)

unclear "This rule is not very explicit because there is no time selector being used" from validator

Reported by: mkoniecz Owned by: team
Priority: normal Milestone:
Component: Core validator Version:
Keywords: template_report opening hours Cc: ypid23

Description

What steps will reproduce the problem?

  1. Encounter hiking route open from 16 May to the end of November.
  2. Tag it
  3. Run validator

What is the expected result?

No validator complaints.

What happens instead?

Validator complains "Opening hours syntax - opening_hours - May 16-Nov 30 <--- (This rule is not very explicit because there is no time selector being used. Please add a time selector to this rule or use a comment to make it more explicit.) (1)".

It is not clear why validator complains and what should be done to fix issue - as I have no idea what is the problem.

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

See https://www.openstreetmap.org/way/80377046

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-04-17 00:51:35 +0200 (Tue, 17 Apr 2018)
Build-Date:2018-04-17 01:31:54
Revision:13646
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13646 en) Linux Ubuntu 16.04.4 LTS
Memory Usage: 728 MB / 869 MB (296 MB allocated, but free)
Java version: 1.8.0_171-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (34095)
+ buildings_tools (34109)
+ continuosDownload (68)
+ imagery_offset_db (34109)
+ reverter (34109)
+ todo (30304)

Last errors/warnings:
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.net.ConnectException: Connection refused (Connection refused)
- W: Already here java.net.ConnectException: Connection refused (Connection refused)
- W: Could not connect to Bing API. Will retry in 512 seconds.: java.net.ConnectException: Connection refused (Connection refused)

Attachments (0)

Change History (9)

comment:1 by Don-vip, 6 years ago

Resolution: worksforme
Status: newclosed

The message says:
there is no time selector being used. Please add a time selector to this rule or use a comment

So you can either add a time selector (00:00-24:00) or add a comment ( "all day").

comment:2 by Don-vip, 6 years ago

Keywords: opening hours added

comment:3 by Klumbumbus, 6 years ago

Cc: ypid23 added

(For more bug reports concerning opening hours validation, please create them here instead: https://github.com/opening-hours/opening_hours.js)

comment:4 by ypid23, 6 years ago

Good evening and thanks for cc-ing me. The interesting thing is that OSM is adapting the opening_hours syntax for many more tags than what it was originally designed for. Thats leads to the situation where for a highway, a time might appear as optional, for amenities it would probably be an error when there is no time specified. That is why it complains. As said by Don-vip, you could add 00:00-24:00 to make the validator (and me) happy. Extra bonus points for also being explicit about the public holiday (that they have no influence on this). Again, see my comment. The syntax has a different focus and having different warnings or a sub-syntax or stuff like this is no solution. I support the use of the syntax at other places, just please follow it even when it seems unnecessary for the tag.

"all day" would work but would also change the result to unknown instead of open.

Having said that, I would suggest the following value: PH off; May 16-Nov 30 00:00-24:00

Last edited 6 years ago by ypid23 (previous) (diff)

in reply to:  4 comment:6 by Klumbumbus, 6 years ago

Replying to ypid23:

Having said that, I would suggest the following value: PH off; May 16-Nov 30 00:00-24:00

Why PH off? I don't think that osmwww:way/80377046 will be closed on public holidays.

comment:7 by anonymous, 6 years ago

AFAIK "May 16-Nov 30 00:00-24:00" would overide it. It is ugly way to specify that it is open also on holidays during 16 May - end of November period.

comment:8 by Klumbumbus, 6 years ago

for this case "Every day, even on public holiday open" the english and german wiki suggest: PH Mo-Su 00:00-24:00 and Mo-Su,PH 00:00-24:00

comment:9 by anonymous, 6 years ago

You are right. I guess I just like this "hack" of tricking the warning detection code because I wrote it and know that it works. But I recognize that this is bad advice to give and I will not longer recommend this syntax.

Please use May 16-Nov 30 Mo-Su,PH 00:00-24:00 instead.

--ypid

Last edited 6 years ago by ypid23 (previous) (diff)

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.