- https://community.openproject.org/work_packages/58865
- show banner below form field selection, if
- hierarchy is selected AND
- enterprise token is not active
- disable submit button, if the enterprise banner is shown
https://community.openproject.org/wp/49765https://community.openproject.org/wp/49784
Original bug was OP#49765: creating a list custom field and then adding
a comment to an existing work package would be impossible. An error
"<custom field> was attempted to be written but is not writable" was
displayed.
In WorkPackageContract, when evaluating what was changed by the user and
by the system, it checks if the custom values are newly set and if they
are default.
The default check was wrong for list custom field, as the default value
was an integer, and the value was a string (created automatically by
Redmine::Acts::Customizable#custom_field_values). i.e. check was `367 ==
"367"`
The default check was wrong for multi-value list custom field as well,
as the default value was a stringified array of integers, i.e. check was
`[367, 368] == "[367, 368]"`. And it is plain wrong anyway because two
CustomValue must be created in this case: one with value 367, second
with value 368. This prevented default values to be pre-selected in the
new work package form (bug #49784).
This commit fixes the default check by returning strings for default
value of list custom fields (bug #49765) and by creating multiple
CustomValue for multi-value list custom fields (bug #49784) when none is
present.
https://community.openproject.org/wp/46492
In the continuity of #11897: detecting if the changed value is the
custom field default value need casting for boolean custom fields.
Without casting, the value would be `"f"` and the default value `false`.
* Allow multi-select CFs for projects
* Render multiple custom values in project row
* Output arrays from custom_value_attributes for multiselect values
* Add spec for copying multi-value cf
* Fix custom field multiselect form on new custom fields
* Fix custom field builder specs
* Add spec for creating/updating projects with multi select
* Add spec to create new multi select project cfs
* Add spec for projects index displaying of custom fields
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.
Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
Only for list types, the value will be an integer to look up by id,
but instead use `CustomValue.new(...).typed_value` to use the formatter
classes to correctly look up the value.
https://community.openproject.com/wp/33496
[ci skip]
Uses FactoryBot to keep and maintain specific records in a special transaction that does not get removed after each spec.
They automatically are created whenever first hitting them.
This makes an excellent time saver for items that are commonly used, such as an admin user account
it was not possible to set a custom field to false via APIv3.
Apparently the way the value is set in other places does not involve
"real" boolean types