I've probably done the same in https://github.com/opf/openproject/pull/586