Modify

Opened 10 months ago

Closed 10 months ago

Last modified 6 months ago

#23153 closed defect (fixed)

[PATCH] Remote Control API call is adding hashtags many times

Reported by: amanda@… Owned by: team
Priority: normal Milestone: 23.11
Component: Core Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Load an area with the remote control like this: http://127.0.0.1:8111/load_and_zoom?top=${b.getNorth()}&bottom=${b.getSouth()}&left=${b.getWest()}&right=${b.getEast()}&new_layer=true&changeset_source=example.com&changeset_hashtags=%23RiverMapping
  2. Edit & upload an see that the hashtag in the changeset comment & hashtags metadata as it is supposed to be.
  3. Keeping JOSM open, load a new area and do the same again

What is the expected result?

The hashtag should be only once in the upload dialog box, and the hashtag should be only once in the hashtags changeset tag.

What happens instead?

The hashtag is duplicated, once for every time you have called the remote control command and is duplicated in the hashtags changeset metadata, and in the comment

example: https://www.openstreetmap.org/changeset/140577449

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

You can see this output when using https://amandasaurus.github.io/osm-river-basins/

The first version included new_layer=true in the Remote Control call, but removing this doesn't solve the problem

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-08-29 13:38:40 +0200 (Tue, 29 Aug 2023)
Revision:18822
Build-Date:2023-08-30 01:30:57
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18822 en) Linux Debian GNU/Linux 12 (bookworm)
Memory Usage: 352 MB / 15864 MB (108 MB allocated, but free)
Java version: 17.0.7+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920×1200 (scaling 1.00×1.00) :0.1 1200×1920 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1920
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_IE.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_IE
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: GNOME
libcommons-compress-java: libcommons-compress-java:all-1.22-1
libcommons-logging-java: libcommons-logging-java:all-1.2-3
fonts-noto: fonts-noto:-
VM arguments: [-Dicedtea-web.bin.location=/opt/OpenWebStart/javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop]

Plugins:
+ FastDraw (36126)
+ Mapillary (2.2.0)
+ MicrosoftStreetside (36126)
+ Review.Changes (1.0.5)
+ SimplifyArea (36126)
+ apache-commons (36034)
+ apache-http (35924)
+ auto_tools (81)
+ buildings_tools (36126)
+ continuosDownload (1.3.4)
+ contourmerge (v0.1.9)
+ ejml (35924)
+ geotools (36068)
+ imagery_offset_db (36126)
+ jackson (36034)
+ javafx (36118)
+ jaxb (36118)
+ jna (36126)
+ jts (36004)
+ log4j (36045)
+ mbtiles (v2.6.1)
+ measurement (36126)
+ opendata (36126)
+ pTerry (v0.2.1)
+ reverter (36126)
+ todo (133)
+ undelete (36126)
+ utilsplugin2 (36126)

Attachments (1)

23153.patch (1.6 KB ) - added by taylor.smock 10 months ago.

Download all attachments as: .zip

Change History (6)

comment:1 by taylor.smock, 10 months ago

Milestone: 23.09
Summary: Remote Control API call is adding hashtags many times[PATCH] Remote Control API call is adding hashtags many times

Thank you for the bug report. I've got a patch I'll be uploading in a few minutes.

by taylor.smock, 10 months ago

Attachment: 23153.patch added

comment:2 by taylor.smock, 10 months ago

Resolution: fixed
Status: newclosed

In 18824/josm:

Fix #23153: Remote Control API call is adding hashtags many times

This occurs due to adding the hashtags to the comment multiple times.

This is fixed by doing the following:
1) When finding hashtags from a comment, only return the distinct hashtags
2) When adding hashtags from the dataset, only add hashtags that are not already

part of the comment.

comment:3 by taylor.smock, 9 months ago

Milestone: 23.0923.10

Ticket retargeted after milestone deleted

comment:4 by taylor.smock, 8 months ago

Milestone: 23.1023.11

Ticket retargeted after milestone deleted

comment:5 by taylor.smock, 6 months ago

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

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.