Modify

Opened 3 years ago

Closed 3 years ago

#21853 closed defect (fixed)

[patch] Validator - unusual value of interval

Reported by: nlehuby Owned by: team
Priority: normal Milestone: 22.02
Component: Core validator Version:
Keywords: public_transport interval Cc:

Description (last modified by nlehuby)

The validator raises warning of values of interval tags that seems legit:
for instance interval=120

(As interval=90 is ok, I can't see why 120 won't be, it is also a number of minutes)

And BTW, it does not raise on 01:30:90 which is not ok

Attachments (1)

0001-improve-validation-of-interval-tag.patch (1.6 KB ) - added by nlehuby 3 years ago.
new patch

Download all attachments as: .zip

Change History (11)

comment:1 by nlehuby, 3 years ago

Description: modified (diff)

comment:2 by nlehuby, 3 years ago

Summary: Validator - unusual value of interval[patch] Validator - unusual value of interval

Here is attached a patch with a new regexp to fix both issues

comment:3 by skyper, 3 years ago

How to tag an interval of several days? For a weekly interval I used 168:00:00 but that will still raise a warning. I could use only minutes, though, I do not like interval=10080.

It might be better to split the regex into two parts. One for only numbers (minutes) and one for the HH:MM:SS with :.

comment:4 by nlehuby, 3 years ago

It might be better to split the regex into two parts. One for only numbers (minutes) and one for the HH:MM:SS with :.

I don't understand, it is already the case, the regexp is in two parts with a | between the two expressions

in reply to:  4 comment:5 by skyper, 3 years ago

Replying to nlehuby:

It might be better to split the regex into two parts. One for only numbers (minutes) and one for the HH:MM:SS with :.

I don't understand, it is already the case, the regexp is in two parts with a | between the two expressions

I am sorry, I misread the patch.

in reply to:  3 comment:6 by nlehuby, 3 years ago

Replying to skyper:

How to tag an interval of several days? For a weekly interval I used 168:00:00 but that will still raise a warning. I could use only minutes, though, I do not like interval=10080.

For public transport interval at least, interval tag should be used in addition with opening_hours tag, and it could be better suited for weekly interval
For instance, for a municipal shuttle bus to the city market on Wednesday morning, I would use instead opening_hours = We 10:00-12:00 and no interval tag

comment:7 by skyper, 3 years ago

Sorry, my example was bad.
Especially, with ferries I knew some that sailed only every three, four or five days. This cannot be expressed in opening hours. Sorry, I do not find the timetables atm.

by nlehuby, 3 years ago

new patch

comment:8 by nlehuby, 3 years ago

Hello,

Does this new patch sound good to you ?

comment:9 by skyper, 3 years ago

Keywords: interval added
Milestone: 22.02

Yes, thanks.
No translation updated needed.

comment:10 by stoecker, 3 years ago

Resolution: fixed
Status: newclosed

In 18384/josm:

fix #21853 - patch by nlehuby - improve interval validator test

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.