27 Commits

Author SHA1 Message Date
Jan Sandbrink f9d8bc6614 Introduce SubclassResponsibility error
This error is intended for cases when a method is
intentionally not implemented, because the module/class defining
it expects a subclass (or class including the module) to implement
the method.

This is intended to distinguish it from other cases, such as:
* feature not implemented yet
* edge case of a method call not yet supported

Notably it avoids the misuse of the Ruby-defined NotImplementedError,
which is only intended for much more specific scenarios:

> Raised when a feature is not implemented on the current platform. For example, methods depending on the fsync or fork system calls may raise this exception [...]

Also see https://docs.ruby-lang.org/en/master/NotImplementedError.html
2026-03-27 08:14:56 +01:00
Henriette Darge d7282755ed Cache the AttributeHelpTexts type dependent 2026-03-23 13:16:33 +01:00
Oliver Günther 3552df22a6 Implement attribute help text caption 2025-11-25 22:06:38 +01:00
Alexander Brandon Coles d17da65477 Freeze string literals in app/models
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/models
2025-07-22 18:26:13 +01:00
Oliver Günther 2234fee59d Don't cache only on user
The user itself doesn't update when a new attribute help text or role is
added to them
2025-06-30 13:41:41 +02:00
Alexander Brandon Coles 33de48f8c7 Normalize AttributeHelpText#attribute_name
Uses `ActiveRecord::Normalization` API to normalize `attribute_name`.
2025-06-09 14:15:07 +01:00
Alexander Brandon Coles 2b0e95244d [#63738] Primerize attribute help texts
Creates the following Primerized components:

* `AttributeHelpTextComponent` to render an icon that will invoke the
  attribute help text dialog on click.
* `AttributeLabelComponent` to render an attribute label and help text
  icon together with the correct spacing.
* `AttributeHelpTexts::ShowDialogComponent` to render the attribute help
  text dialog itself.

Also creates accompanying Controller actions, routes and specs.
2025-06-03 12:33:34 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
ulferts 89cfee203f remove usage of require_dependency
according to the rails 6 migration guide, it should no longer be necessary: https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#require-dependency
2022-01-07 14:46:21 +01:00
ulferts af5d400bb2 linting 2021-11-22 11:09:39 +01:00
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
ulferts 6140f4c7e9 update copyright to 2021 (#8925)
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
2021-01-13 17:47:45 +01:00
Oliver Günther b1a99353e2 Extend attribute help text for projects and allow images
Attribute help text so far could only be added to work packages.
This commit adds support for projects and adds the help texts to
widget headers for status and description modals in the overview tab
as well as extending the attachable mixin to allow uploading images.

Uploaded attachments are to be expected to be visible regardless of permissions,
thus this also adds an option to make attachments visible to all
2020-07-13 13:10:14 +02:00
Oliver Günther 53f2d694ff Use AnyFixtures to generate fixtures from factories (#7230)
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
2020-04-09 11:54:26 +02:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
ulferts 4b7e3ff26d Feature/limit attribute help text visibility (#5749)
* code prettification

* avoid help text for newly added cf requiring restart

When using the class method statically, the values are determined upon reading the class. By that, a restart is required before newly added custom fields are added to the list and removed custom fields will still be listed

* limit visibility of attribute help texts

[ci skip]
2017-07-12 21:13:28 +02:00
Oliver Günther 9fabaaaf13 Show only attributes from the type attributes and status, project 2017-07-06 14:21:31 +02:00
Oliver Günther 57356059af Create /help_texts endpoint 2017-07-06 14:20:58 +02:00
Oliver Günther 39e11c72dc Create backend for help text CRUD 2017-07-06 14:20:57 +02:00