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
Replaces reform by a simple layer of Disposable +
ActiveModel::Validations for contracts.
Additionally removes the custom error handling where OpenProject added
symbols to keep the ability to identify faulty attributes while having
non standard format (deviates from `%{attribute} %{message}`).
Changes to active record now allow us to define the format of a message
on i18n level, e.g. `%{message}`. Therefore the patching can be removed.
Reform plans to remove support for ActiveModel::Validations in version
4.0 at the latest but even today, support for it is hapazard. As we do
not need the full stack of Reform anyway, we can solely rely on
Disposable.
Instead of going to root, we now only go up till to's first ancestor not shared with from. That way, we avoid wrongfully detecting transitive follows + hierarchy relations from to's root pointing to from.
[ci skip]
For reasons beyond me, using
validated :to do
add an error
end
seems to be execute in a different context (class) than
attribute :to do
add an error
end
The later, has the correct i18n_scope set as it is a child of
::ModelContract.
* bump reform and roar -> bumps representer
* adapt to changed validation interface
* disable initializer patch for now
* adapt to changed representable attr interface
* can no longer have private methods inside a representer
* private no longer possible for representer
* bump reform
* wip - restyle validation
* remove commented out patch
* apply injection as prescribed
* reactivate reform error symbols patch
* remove patch to Hash superfluous wit ruby 2.3
* remove outdated human_attribute_name patch
* whitespace fixes
* adapt filter name after removal of human_attribute_name patch
* adapt filter specs to no longer rely on human_attribute_name patch
* fix version filter name
* remove reliance on no longer existing human_attribute_name patch
* use correct key in journal formatter
* remove private from representer
* adapt to altered setter interface
* reenable i18n for error messages in contracts
* no private methods in representer
* defined model for contracts
* fix validaton
* instantiate correct Object
* define model for contract
* circumvent now existing render method on reform
* replace deprecated constant
* patch correct reform class - not the module - via prepend
* refactor too complex method
* replace deprations
* remove remnants of parentId
* prevent error symbols from existing twice
* adapt user representer to altered setter interface
* adapt watcher representer to altered setter interface
* remove now unnessary patch
* adapt setter to altered interface
* adapt spec
* fix custom field setters
* remove parentId from wp representer
As the parent is a wp resource, clients should use the parent link instead
* adapt spec to changed valid? interface
* remove parentId from wp schema
* replace references of parentId in frontend
* remove TODO
[ci skip]