Opened 5 years ago

Last modified 9 months ago

#12716 new defect

<preset_link>: prefer target in current source, then search in defaultpresets, then search in other external presets

Reported by: Klumbumbus Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report tagging preset link Cc:

Description (last modified by Klumbumbus)

What steps will reproduce the problem?

  1. add Presets/NewTags
  2. modify the internal preset by adding the following line to e.g. the church preset: <preset_link preset_name="Building" />
  3. add the modified preset below the NewTags preset in the preset list in the preferences
  4. restart josm
  5. open the church preset

What is the expected result?

the internal building preset is linked

What happens instead?

the building preset from the external NewTags preset is linked

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

As different preset files maybe use the same preset item names this can lead to unwanted behavior depending on the users order of his presets. (There is also no way to reorder your presets like you can do with mappaint styles.)

<preset_link preset_name="..." /> should only match preset items from "its own" preset file and not from other preset files.

I'm currently working on improving the internal preset by linking the building preset in some amenity presets. However this bug blocks it.

Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-03-31 23:51:13 +0200 (Thu, 31 Mar 2016)
Build-Date:2016-04-01 01:32:11
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10092 de) Windows 7 32-Bit
Memory Usage: 247 MB / 742 MB (125 MB allocated, but free)
Java version: 1.8.0_77-b03, Oracle Corporation, Java HotSpot(TM) Client VM
VM arguments: [,\Program Files\Java\jre1.8.0_77\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Program Files\josm-latest-bla.jnlp, -Djnlpx.remove=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=256m,768m, -Djnlpx.splashport=56489, -Djnlpx.jvm=<java.home>\bin\javaw.exe, -Djnlpx.vmargs=LURqYXZhLnV0aWwuQXJyYXlzLnVzZUxlZ2FjeU1lcmdlU29ydD10cnVlAA==]
Dataset consistency test: No problems found

- AddrInterpolation (31772)
- DirectDownload (31934)
- DirectUpload (31949)
- HouseNumberTaggingTool (31772)
- Mapillary (32040)
- OpeningHoursEditor (31772)
- Tracer2 (32042)
- apache-commons (31895)
- apache-http (31895)
- buildings_tools (31895)
- editgpx (31772)
- imagery_offset_db (32046)
- log4j (31895)
- measurement (31895)
- photo_geotagging (31895)
- photoadjust (32016)
- reverter (32005)
- tag2link (31910)
- tagging-preset-tester (31895)
- terracer (31895)
- turnrestrictions (31895)
- undelete (31895)
- utilsplugin2 (32099)
- wikipedia (32114)

Tagging presets:
- D:\Stefan\OSM\JOSMSVN\data\defaultpresets.xml
- D:\Stefan\OSM\TestNew\newpresets.xml

Map paint styles:
- D:\Stefan\OSM\JOSMSVN\styles\standard\elemstyles.mapcss
- D:\Stefan\OSM\TestNew\newicons.mapcss
- D:\Stefan\OSM\eigene styles\SpecificBuildingValues\SpecificBuildingValues.mapcss
- D:\Stefan\OSM\eigene styles\Tourenplanung.mapcss
- D:\Stefan\OSM\eigene styles\
- D:\Stefan\OSM\patches\old MPs\dataquality.mapcss

Validator rules:
- D:\Stefan\OSM\TestNew\new.validator.mapcss

Attachments (0)

Change History (8)

comment:1 Changed 5 years ago by Klumbumbus

Description: modified (diff)

comment:2 Changed 5 years ago by Klumbumbus

In 10111/josm:

see #9203, see #12716 - add a preset link to the "Building" Preset to some amenities/leisures, which often use a whole building

comment:4 Changed 15 months ago by skyper

Keywords: tagging preset link added

So at least the order to search for could be changed:

The best order would be:

  1. the preset
  2. defaultpresets
  3. other external presets

To completely fix this problem, some way to differ between items with same name is needed, like the *_context attributes for translation. A new source_name attribute for item or source for preset_link.

comment:5 Changed 15 months ago by skyper

I added a warning and a link, please, remove if fixed:

comment:6 Changed 14 months ago by simon04

Summary: don't link preset items from other preset files<preset_link>: prefer target in current source, then search in defaultpresets, then search in other external presets

comment:8 Changed 9 months ago by Klumbumbus

There is another problem: even group names are catched which creates dead links in the preset window.
Worked around one more:

Modify Ticket

Change Properties
Set your email in Preferences
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 Klumbumbus
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.