Modify

Opened 6 months ago

#24451 new enhancement

Allow editing the times of conditional tags

Reported by: mattmccutchen Owned by: boman
Priority: normal Milestone:
Component: Plugin openinghourseditor Version:
Keywords: template_report Cc:

Description

Conditional tags have opening hours specifications embedded in them, for example, restriction:conditional=no_left_turn @ (Mo-Fr 16:00-18:00). It would be great if I could edit the opening hours portion of the value using the opening hours editor. I tried asking the plugin to edit the restriction:conditional tag, but it reported a parse error, which is expected if it tries to interpret the whole value as an opening hours specification. For comparison, Vespucci's opening hours editor also supports conditional tags.

One possible design that would be reasonably straightforward: When populating the "edit existing tag" list box, if a key ending in :conditional is found, then split the value on unparenthesized semicolons into value-condition pairs and add each value-condition pair as a separate entry in the list box so the user can choose one of them to edit. Supporting addition of a new value-condition pair might be more trouble than it's worth; the user could add the pair with a dummy condition and then edit the condition using the plugin.

Of course, a workaround to edit a conditional tag with the current plugin is to copy the condition to a dummy tag, edit that tag, and then copy the revised condition back into the conditional tag.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2025-07-11 10:12:51 +0200 (Fri, 11 Jul 2025)
Revision:19423
Build-Date:2025-07-12 01:30:35
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (19423 en) Linux Fedora Linux 41 (Forty One)
Memory Usage: 346 MB / 4074 MB (89 MB allocated, but free)
Java version: 21.0.8+9, Red Hat, Inc., OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920x1080x[Multi depth]@46Hz (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_US.utf8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: X-QUBES
Java package: java-21-openjdk:x86_64-21.0.8.0.9
VM arguments: [--add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED]
Dataset consistency test: No problems found

Plugins:
+ HouseNumberTaggingTool (36438)
+ OpeningHoursEditor (36438)
+ reverter (36447)
+ tageditor (36438)
+ turnlanes-tagging (1746100629)
+ turnrestrictions (36438)
+ undelete (36438)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1

Last errors/warnings:
- 00006.048 E: Failed to locate image 'http://o.aolcdn.com/os/mapquest/marketing/MQ_Icon/Tiny/MQ_Icon_Tiny.png'
- 00023.975 W: java.net.SocketTimeoutException: Connect timed out
- 00030.010 W: java.net.SocketTimeoutException: Connect timed out
- 00498.239 E: Failed to locate image 'http://o.aolcdn.com/os/mapquest/marketing/MQ_Icon/Tiny/MQ_Icon_Tiny.png'
- 00546.596 W: Pending errors and warnings - <html>There are still 2 errors and/or warnings identified for this turn restriction. You are recommended to resolve these issues first.<br>Do you want to save anyway?
- 00554.849 W: Pending errors and warnings - <html>There are still 2 errors and/or warnings identified for this turn restriction. You are recommended to resolve these issues first.<br>Do you want to save anyway?
- 00933.912 W: org.openstreetmap.josm.plugins.ohe.parser.TokenMgrError: Lexical error at line 1, column 1.  Encountered: 'n' (110),
- 00937.140 W: Disable opening hours editor:: org.openstreetmap.josm.plugins.ohe.gui.OheException: Error in the TimeValue. Cause: org.openstreetmap.josm.plugins.ohe.parser.TokenMgrError: Lexical error at line 1, column 1.  Encountered: 'n' (110),

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain boman.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from boman to the specified user.
Next status will be 'needinfo'. The owner will be changed from boman to mattmccutchen.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from boman to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.