17724 respect group assignment condition

https://community.openproject.org/work_packages/17724
Line is too long. [105/99]