Fix group and order of cost's attributes

[``* `#17242` Spent time assigned to wrong group and order of cost's attributes wrong``](https://community.openproject.org/work_packages/17242)