﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
18596	[PATCH] Fix relation ordering after split-way	JeroenHoek	team	"In some cases the split-way command failed to detect the direction of ways part of a relation by breaking too soon from the loop that inspects relation members. This commit fixes this.

The types of relations affected are route, multipolygon, and boundary relations; e.g., relations containing ordered sets of ways.

Additionally, a warning is shown to the user if by splitting the way a relation may have been damaged. This warning is raised when all of these requirements are met:

* the relation concerned is a route, multipolygon, or boundary relation,
* has more than one member,
* does not have all of its members downloaded, and
* the direction could not be determined from the available members.

== Background

This bug causes routes for public transport, hiking, and cycling to break when edits are performed on small parts of the map — e.g., when a mapper is working on details in a neighbourhood. It is common for such relations to have only a few members downloaded.

The split way command tries to determine the order of the new parts by looking at the available members, but due to a bug in the detection loop this can fail even when at least two connected members are available. This specific bug is hit when a way is split that is at one end of the downloaded members: in that case there is a 50% chance (depending on the position of the member in the relation) that the split will place the new parts in the wrong order. This commit solves this by not breaking from the detection loop too soon."	defect	closed	normal	20.03	Core	latest	fixed		Larry0ua taylor.smock
