mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
9b657120bd
In status based mode, `remainingTime` is marked as `writable: false`. The popover edit field tries to write it, but that is ignored when submitting the creation, and it renders nil instead. When then submitting, this nil value will be submitted and result in the error "Remaining work must be set when work is set". By setting `render_nil: false` for `remainingTime` in the `WorkPackageRepresenter`, the field is not returned back from the form endpoint when it is not set. This way, the field is not rendered in the form on submit, and the error is avoided. In work-based mode, the remainingTime being not sent back by the form anymore when it is nil means we have to deal with it being undefined, which is why the progress popover had to be modified too.