﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
17845	[PATCH] There should be a method to check for roles in relations	taylor.smock	Don-vip	"Since the child/parent selectors cannot be chained, and properties cannot be used on the left side of the child selector, it would be good to have a function to determine if a relation has a specific role.

Example:
{{{
#!mapcss
relation[type=destination_sign][!has_role(""to"")] {
  throwError: tr(""{0} has no {1} role"", ""destination_sign"", ""to"");
}
}}}

What I had tried:
{{{
#!mapcss
/* properties are not supported on the left side of a selector */
relation[type=destination_sign] >[role=to] * { set .to_role }
*.to_role  < relation[type=destination_sign] {
  throwError: tr(""{0} has no {1} role"", ""destination_sign"", ""to"");
}

/* Apparently chaining child/parent selectors isn't a thing */
relation[type=destination_sign] >[role=to] * < relation[type=destination_sign] {
  throwError: tr(""{0} has no {1} role"", ""destination_sign"", ""to"");
}
}}}"	enhancement	closed	normal	19.08	Core mappaint		fixed	mapcss validator relation role member	
