﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
20861	"Tagging preset: ""value_template"" always overwrites value without strong indication and without option to disable."	skyper	team	"This is a follow-up of #18949 and #20851

On #18949, [/ticket/18949#comment:6 KorneySan] wrote in comment 6:
> On preset dialog closing by OK button the engine should check the `name` value and if it is empty AND `default_template` is set, it should evaluate `default_template` and set the result to the `name`.

In #20851s description [/ticket/20851 skyper] wrote:
> One more question: Is it wise to change an existing value, automatically, without user's interaction??
> Think we need at least a preference option to enable/disable this feature of overwriting values. 

==== What steps will reproduce the problem?
1. Have a preset using `value_template=""""`
1. Create an object and tag it with preset
1. After closing the preset, change the value of the tag with `value_template=""""`
1. Open the preset again with the object still selected

==== What is the expected result?
* ~~A strong indication about the automatically change of the value~~ (fixed in r18080)
* An option to reset the value
* An option to disable this automatism completely

==== What happens instead?
* ~~no strong indication~~ (fixed in r18080)
* the value is always changed, despite having set it manually in advance and there is no quick way to reset
* no preference option to disable `value_template`

==== Please provide any additional information below. Attach a screenshot if possible.
* At least some stronger indication of the automatic value change like an prominent icon is needed. 
* How about touching the value only if the value is empty. User could still delete the value in the preset to reactivate the template but values are not overwritten automatically.
* I did not check on `name_template=""""` but I would say, the use of templates should be in user control with preferences options to generally enable/disable the use of each of both templates.

Thanks a lot for your work, I really appreciate it.

> {{{
> #!preset
>     <group name=""Public Transport"" icon=""presets/transport/bus.svg"">
>         <item name=""Public Transport Route (Rail)"" icon=""presets/misc/route.svg"" type=""relation"" preset_name_label=""true"">
>             <link wiki=""Public_transport#Service_routes"" />
>             <space />
>             <key key=""type"" value=""route"" />
>             <combo key=""route"" text=""Route type"" values=""train,subway,monorail,tram,light_rail"" values_searchable=""true"" match=""keyvalue!"" />
>             <key key=""public_transport:version"" value=""2"" /> <!-- only validate marked relations in order to avoid false positives -->
>             <text key=""name"" text=""Name"" value_template=""?{route=train 'Train'|route=subway 'Subway'|route=monorail 'Monorail'|route=tram 'Tram'|route=light_rail 'Light_rail'|''} {ref}?{': {from} - {via} - {to}'|': {from} - {to}'|''}"" />
>             <text key=""ref"" text=""Reference"" />
>             <text key=""from"" text=""from"" />
>             <text key=""to"" text=""to"" />
>             <text key=""via"" text=""Via"" />
>         </item> <!-- Public Transport Route (Rail) -->
> }}}

{{{
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-05-06 22:44:54 +0200 (Thu, 06 May 2021)
Revision:17878
Build-Date:2021-05-07 01:31:01
URL:https://josm.openstreetmap.de/svn/trunk
Plugins:
+ tagging-preset-tester (35640)

Tagging presets:
+ ${HOME}/JOSM/new/resources/data/defaultpresets_17833_route_17661_18662.xml
}}}
"	defect	new	normal	21.07	Core	latest		template_report tagging preset value_template	simon04
