Modify

Opened 3 years ago

Last modified 16 months ago

#21691 new enhancement

Group inside group not properly allocated within the menu

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

Description

What steps will reproduce the problem?

I'll describe this plugin using examples.
Example one, what works:
https://josm.openstreetmap.de/josmfile?page=Presets/PhilippinesAddresses&zip=1

This will show up under "Annotation" properly - nothing wrong.

But -
this https://josm.openstreetmap.de/wiki/Presets/PhilippinesTrafficSigns
and then
https://josm.openstreetmap.de/wiki/Presets/PhilippinesJeepneys

They should both be under the group "Philippines" and they do! But, but, there's a bogus group "Philippines" created under the group "Philippines" and it shouldn't of course!

I tried then to put it under "Transport" and same happens..
A bogus "Transport" empty is created under "Transport"

I spend literally 6 hours to figure it out, and I did find the reason for this bug

The reason:
as long as it's just "items" that are being merged with another preset no bogus groups are created.

The moment you have "groups" defined in the 2nd preset, that's when JSOM creates this bug of having a bogus menu entry - empty- useless under the original group. basically it copies the parent group to a child as empty bogus group.

And ANY group under group creates this bug.

Its a trivial bug, who knows the code will be quick in finding the bug and fix it. I know if this were c# or C++ I'd be able to fix it within minutes - sadly I don't do Java nor do I know the code of JOSM so hoping a more experienced java dev of JOSM will fix it in a timely manner.

Thanks.

note: Please don't move this to "presets" component as the bug is in the core of JOSM not handling the groups inside presets properly.

What is the expected result?

What happens instead?

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

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-11-01 23:05:46 +0100 (Mon, 01 Nov 2021)
Build-Date:2021-11-01 22:25:18
Revision:18303
Relative:URL: ^/trunk

Identification: JOSM/1.5 (18303 en) Windows 10 64-Bit
OS Build number: Windows 10 Home Single Language 2009 (19043)
Memory Usage: 2620 MB / 7282 MB (2245 MB allocated, but free)
Java version: 1.8.0_311-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.00×1.00) \Display1 3840×2160 (scaling 1.00×1.00)
Maximum Screen Size: 3840×2160
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Dataset consistency test: No problems found

Plugins:
+ DirectDownload (35640)
+ ImageWayPoint (35640)
+ ImproveWay (32)
+ KartaView (387)
+ RoadSigns (35640)
+ apache-commons (35524)
+ apache-http (35589)
+ continuosDownload (99)
+ editgpx (35562)
+ imagery_offset_db (35640)
+ jaxb (35543)
+ jna (35872)
+ jogl (1.2.3)
+ kendzi3d (1.0.205)
+ kendzi3d-resources (0.0.2)
+ log4j (35881)
+ openqa (0.2.2)
+ pbf (35825)
+ photo_geotagging (35783)
+ photoadjust (35891)
+ undelete (35848)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/PhilippinesAddresses&zip=1
+ <josm.pref>\Phillipines_Jeepney\Phillipines_Jeepney.xml
+ <josm.pref>\Philippines Traffic Signs\PhilippinesTrafficSigns.xml

Map paint styles:
- https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/ColorWays&zip=1
+ %UserProfile%\Documents\elemstyles.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/ColourGPSData&zip=1
- https://www.dropbox.com/s/qo3ai47fpv241jf/Styles_Fixme_and_Notes.zip?raw=1

Last errors/warnings:
- 00192.399 E: Failed to locate image ''
- 00192.400 W:  Regulatory: Could not get presets icon 
- 00347.455 E: Failed to locate image '[[Image(pond.png)]]'
- 00347.457 E: Failed to locate image '[[Image(oil-palm.png)]]'
- 00353.793 E: Failed to locate image '[[Image(pond.png)]]'
- 00353.797 E: Failed to locate image '[[Image(oil-palm.png)]]'
- 00438.709 E: Failed to locate image '[[Image(pond.png)]]'
- 00438.711 E: Failed to locate image '[[Image(oil-palm.png)]]'
- 00446.434 E: Failed to locate image '[[Image(pond.png)]]'
- 00446.436 E: Failed to locate image '[[Image(oil-palm.png)]]'

Attachments (1)

double.png (475.0 KB ) - added by mrgenie 3 years ago.
showing the double/duplicated/bogus/empty entry that's being created

Download all attachments as: .zip

Change History (4)

comment:1 by skyper, 3 years ago

Keywords: external tagging preset added
Priority: majornormal
Type: defectenhancement
Version: latest

Screenshots and the corresponding source code lines would be useful. As far as I know, identical names for items and groups can lead to problems and are not (fully) supported, yet, see #12716. I only found #10056 for request on exchange between presets. Looks like an enhancement request.

by mrgenie, 3 years ago

Attachment: double.png added

showing the double/duplicated/bogus/empty entry that's being created

comment:2 by mrgenie, 3 years ago

Well it is basically working.. it just creates this "bogus 2nd entry" .. that's my only complaint really..

showing the double/duplicated/bogus/empty entry that's being created

I added here a small screenshot what I mean.

You can merge 2 into the "philippines" as parent group..
It works without a problem in the actual merged groups. both work just fine

Just the "Philippines" created inside the "Philippines" is useless/empty/unnecessary

it's basically just an optical glitch..

I'm sure a java programmer who knows exactly where in the code to look for, can easily spot this "2nd bogus" entry and prevent it from being created since the merging itself actually works

comment:3 by skyper, 16 months ago

Ticket #22987 has been marked as a duplicate of this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to mrgenie.
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 team 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.