﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
15704	[PATCH] Keep order of tags added by 'addtags=' query parameter	skorbut	team	"If one adds tags using the query parameter {{{addtags=}}}, they inherently have an order. This order might be or might not be relevant to the user of JOSM. When the ""Add tags to selected objects"" dialog is used, the order of the tags gets lost due to the usage of the type {{{HashSet<>}}} in the class {{{AddTagsDialog}}}. (This is not only a theoretical issue, tags get indeed reordered seemingly randomly.)

Example: http://localhost:8111/load_and_zoom?select=currentselection&bottom=46.840191627005915&top=46.84039162700592&left=9.654214585876465&right=9.654514585876464&addtags=addr%3Astreet%3DFatsch%C3%A8l%7Caddr%3Apostcode%3D7028%7Caddr%3Acity%3DSt.%20Peter%7Caddr%3Acountry%3DCH%7Ccontact%3Aemail%3Dmail%40sporthoteltanne.ch%7Ccontact%3Aphone%3D%2B41%2081%20374%2016%2085%7Ccontact%3Afax%3D%2B41%2081%20374%2016%2086%7Ctourism%3Dhotel%7Cname%3DHotel%20Tanne%7Ccontact%3Awebsite%3Dhttp%3A//www.sporthoteltanne.ch&changeset_source=TOMAS-GR%20%282017-10-22%29

This simple patch keeps the order of the tags by using the type {{{LinkedHashSet<>}}} instead. Therefore the creator of the remotecontrol URL can control, in which order tags are shown to the JOSM user.

Why is this useful? Given a site such as http://demo.tlab.ch/tomas-gr , tags might be shown to the JOSM user a second time, independently of JOSM. By keeping the tag order, it is easier for the user to compare the two lists of tags. [*] If instead the order of tags doesn't matter to the user, this patch doesn't make things worse.

Why not sort them alphabetically? We don't know if this is what the user wants/expects. The tags might be sorted by some definition of importance. However, I plan to create and submit another patch, which lets the user sort the list of tags in the dialog by ""Key"", ""Value"" and ""Existing values"".

[*] Note that the order of tags ''shown'' at http://demo.tlab.ch/tomas-gr is currently not the same as the order of tags placed into the remotecontrol URL."	enhancement	closed	normal	17.12	Core remotecontrol		fixed		
