Content
You are here:
Contracts empty status_id
Added by Alexander Aleschenko 3 months ago
Hi,
I'm new to OpenProject and trying to get into internals of it. Currently I want to make some of work packages' attributes and custom fields as read only depending on current WP's status. Something like this, but in different way(for now).
So I'm looking into WorkPackages::BaseContract#reduce_by_writable_permissions
and BaseContract#collect_writable_attributes
, getting there full list of attributes and can write protect if needed, but in debug sessions I never get there model
instance with status_id
filled in and model's id
is empty as well. I have there only type_id
and project_id
, but this doesn't give me the way to get current WP's status. May be I look into the wrong place or miss something?