openproject
openproject copied to clipboard
[#70107] Required project attributes not enforced on POST /api/v3/projects
Ticket
https://community.openproject.org/wp/70107
What are you trying to accomplish?
Fix the project creation api endpoint erroneously skipping required custom field validations.
What approach did you choose and why?
Update the BaseServices::SetAttributes#set_custom_values_to_validate to validate all custom field values when the record is not persisted, while validating user-provided custom field values when the record is persisted. This is in line with the specification.
Merge checklist
- [x] Added/updated tests
- [ ] Added/updated documentation in Lookbook (patterns, previews, etc)
- [x] Tested major browsers (Chrome, Firefox, Edge, ...)