Repository navigation
Description
JOSM should automatically append the start and end date to each element’s label.
Rationale
Mappers have historically appended date ranges to name=* in order to distinguish copies of the same feature that share the same name, especially boundary relations representing the same polity over time. This is unfortunate tagging for the editor. As of OpenHistoricalMap/iD#184 and OpenHistoricalMap/ohm-website#277, start_date=* and end_date=* are automatically appended to element labels in iD and the website, respectively, reducing the need for this workaround.
JOSM is the last holdout, still labeling elements by name=* alone in a number of locations, including the Selection, Relations, and Validation Results sidebar panels. Most mappers who specialize in large features like boundaries and railways prefer JOSM, so they’re understandably reluctant to abandon the hard-coded date ranges.
Implementation notes
We haven’t forked JOSM like we’ve forked other parts of the OSM software stack, so we’re dependent on the customization options it provides out of the box.
I had been led to believe that you could customize the format using relation.nameOrder, but unfortunately this is just a list of key names, not the full name template syntax. That syntax is only available for presets. We should publish our own presets (#556), but a preset pack for every common feature type would be quite unmanageable.
Apart from those settings, JOSM’s label formats for general features and relations are hard-coded in DefaultNameFormatter. Despite the name, several parts of the codebase instantiate a DefaultNameFormatter directly without any abstraction.
It’s unclear to me whether a plugin could override DefaultNameFormatter somehow. If so, it would make some sense to publish such a plugin. Otherwise, we might have to ask the JOSM developers to unconditionally include logic to append start_date=* and end_date=* whenever it appears, knowing that these keys are much less common in OSM. Alternatively, we could ask them to special-case OHM somehow or provide a more extensible customization hook, such as an advanced preference that accepts name template syntax.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn Production
Activity
1ec5 commentedon Mar 27, 2025
I opened this issue here to start with so we can investigate whether a plugin is even feasible. Otherwise, we’ll need to track the feature enhancement upstream in the JOSM issue tracker.
1ec5 commentedon Mar 28, 2026
@danvk seems to have solved the list views with a custom preset, and we have documented instructions for solving the map view using the QuickLabel plugin. Some assembly is still required, but we’re in pretty good shape now. #556 tracks publishing a preset pack that’s more discoverable through the JOSM plugin manager.