﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
21825	[PATCH] Delete relations by default when all members are deleted	Fred73000	team	"Hi,

IMPORTANT : I'm not using JOSM so don't ask me anything about it (like technical informations).

According to [https://lists.openstreetmap.org/pipermail/talk/2021-April/086499.html this old talk] and according to this overpass query 
{{{
[out:csv(::type,::id,::version,::timestamp,::changeset,::count)]
[timeout:600];
(
  relation[type](if: count_members() == 0);
  relation[!type](if: count_members() == 0);
) -> .all_empty;
rel(br.all_empty) -> .parents;
rel(r.parents) -> .relmembers;
(.all_empty; - .relmembers;) -> .fullempty;
/* (.all_empty; - .fullempty;) -> .empty_but_in_a_rel; */

.fullempty out count;
.fullempty out meta;

/*.empty_but_in_a_rel out count;
.empty_but_in_a_rel out meta;*/
}}}

JOSM is the great winner to create empty relations (I mean with no member and not member of another relation = with no geometry therefore invisible) for more than 10 years.

More than 50 000 bad relations were deleted 10 months ago, the list is in this [https://storage.googleapis.com/osm_cleanup/emptyRelation.csv file], thousands more in the following months (by me in particular) and today there are still 12 787 empty relations, most created by JOSM.

Juste the ones created today with JOSM =
||@type		||@id		||@version	||@timestamp	||@changeset||
||relation	||11641763	||2	||2022-02-02T13:53:15Z	||116914653||
||relation	||13751283	||1	||2022-02-02T13:53:15Z	||116914653||
||relation	||13751278	||1	||2022-02-02T13:52:35Z	||116914626||
||relation	||13746202	||2	||2022-02-02T13:50:01Z	||116914514||
||relation	||11372799	||2	||2022-02-02T13:30:27Z	||116913726||
||relation	||11592420	||2	||2022-02-02T12:43:30Z	||116911875||
||relation	||11373145	||2	||2022-02-02T11:53:23Z	||116909851||
||relation	||11641931	||2	||2022-02-02T11:44:38Z	||116909527||
||relation	||13750701	||1	||2022-02-02T11:21:06Z	||116908592||
||relation	||13750702	||1	||2022-02-02T11:21:06Z	||116908592||
||relation	||13283862	||2	||2022-02-02T10:21:17Z	||116906028||
||relation	||13063916	||2	||2022-02-02T10:07:42Z	||116905454||
||relation	||11687436	||2	||2022-02-02T09:48:46Z	||116904641||
||relation	||13366944	||2	||2022-02-02T07:25:14Z	||116898981||

Could you do ANYTHING to stop to create these bad datas in OSM ?
There are possibly several reasons for their creations, like I say above, I'm not using JOSM so I don't know why, I just can say how many and how long. Just have a look to the relations in the table above, have a look at some of the around 12 000 others and try to find all the problems to stop this very bad thing.

Best regards
"	defect	closed	normal	22.03	Core		fixed		
