﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
14498	Terracer-with-Relation is Removing the Previous House Relation Member + other errors	alexkemp	team	"This is a bizarro series of errors, so please have patience. I think that I've found a scenario that will allow the issues to be seen clearly.

I'm working upon a section of the map (Plantagenet Court) where Address-nodes have been previously added, but neither houses nor associatedStreet relations have been added, and I am adding those latter whilst attempting to retain previous history.

==== What steps will reproduce the problem?
1. Update whole system, including JOSM.
2. Use Building tools to draw 2 buildings
(abutting each other, as at end will be joined as a terrace)
3. Select righthand house + street & initiate terracer
(see begin.png)
(no house numbers selected, only number of segments + associatedStreet is ON - this has worked flawlessly for 12 months until very recently)
4. After pressing `<OK>` a Conflict Resolution dialog appears
(see Workspace 1_002)
(a splendid bug in itself, as there should be zero conflicts to resolve)
(the dialog asks whether to *keep* or *remove* the relation for House-5; I choose 'keep')
(this is a bug, as 5 Plantagenet Court is uninvolved in the process - see begin.png)
5. After pressing `<Apply>` the 2 semi-detached houses are correctly created but, checking back at No.5, we see that it's associatedStreet relation has been removed.
(see Workspace 1_003)
6. Whilst restoring the associatedStreet relation for No.5, I notice that there is an extra (unknown) relation in addition to the 2 un-numbered semi-detached relations just entered
(see Workspace 1_004)
(above No.5 after being sorted)
7. Now select the right-hand semi-detached just created + the Address-node + initiate terracer (this is the soon-to-be No.4)
8. After pressing `<OK>` a Conflict Resolution dialog appears yet again, asking whether I wish to keep/delete each of 3 (three) x 'House number 4'. Splendid. I choose keep/remove/remove:
(see Workspace 1_005)
9. Pressing `<Apply>` correctly creates the house + (hopefully) retains the history. Checking back at the relation, No.4 is created & only the final un-numbered half of the semi is left.
10. Repeating the above with the left-hand semi (No.3) gives a Conflict dialog with just 2 options
(see Workspace 1_006)
11. The two houses are now created. The bell rings & I slink across to my corner. My trainer towels me down & whispers encouraging sentiments. I'm unsure, and am not looking forward to the next round.

==== What is the expected result?
Almost none of the above

==== What happens instead?
All of the above

==== Please provide any additional information below. Attach a screenshot if possible.
I've restarted & retried with another set of similar houses, but this time with JOSM 11639 (stable) + terracer 33088. The behaviour is identical.
The essence appears to be creating 2 copies of the house within the relation when using a previously-created Address-node. However, I have zero idea as to where on earth deleting the previous house comes from.

{{{
URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-03-10 23:18:47 +0100 (Fri, 10 Mar 2017)
Build-Date:2017-03-11 02:32:07
Revision:11715
Relative:URL: ^/trunk

Identification: JOSM/1.5 (11715 en_GB) Linux Debian GNU/Linux 8.7 (jessie)
Memory Usage: 699 MB / 1636 MB (217 MB allocated, but free)
Java version: 1.8.0_121-8u121-b13-1~bpo8+1-b13, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1366x768
Maximum Screen Size: 1366x768
Java package: openjdk-8-jre:amd64-8u121-b13-1~bpo8+1
Java ATK Wrapper package: libatk-wrapper-java:all-0.30.5-1
VM arguments: [-Djosm.restart=true, -Djosm.dir.name=JOSM-latest, -Djava.net.useSystemProxies=true]
Dataset consistency test: No problems found

Plugins:
+ DirectUpload (33182)
+ Mapillary (v1.4.2)
+ apache-commons (32994)
+ apache-http (32699)
+ buildings_tools (33004)
+ continuosDownload (53)
+ terracer (33088)

Last errors/warnings:
- W: java.net.UnknownHostException: api.openstreetmap.org
- W: Already here java.net.UnknownHostException: api.openstreetmap.org
- E: java.net.UnknownHostException: api.openstreetmap.org
- W: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.UnknownHostException: api.openstreetmap.org
- W: java.net.UnknownHostException: api.openstreetmap.org
- W: Already here java.net.UnknownHostException: api.openstreetmap.org
- E: java.net.UnknownHostException: api.openstreetmap.org
- W: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.UnknownHostException: api.openstreetmap.org
- E: Handled by bug report queue: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive must be part of the dataset: {Node id=4256750513 version=1 MDT lat=52.9584777,lon=-1.1383649}
- W: The amount of running downloads is equal to 0
}}}
"	defect	new	normal		Plugin terracer	latest		template_report	
