53 Commits

Author SHA1 Message Date
Jan Sandbrink 272ff67619 Introduce visible scope for types and statuses
Both models are only supposed to be visible
to users that have some basic permissions in at least
one project. While the desired scoping is not very fine grained
(you either see all or nothing), it still makes sense for all
models to have such a scope for consistency purposes.
2026-02-19 13:27:24 +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
Christophe Bliard 0d27c121e6 [58129] Make Status % Complete a required field
https://community.openproject.org/wp/58129
2024-09-30 10:43:41 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Christophe Bliard 1c5c4c82fa Remove "Update work package % Complete values" button in admin
It's not needed anymore are the values are constantly kept in sync.
2024-04-10 09:15:00 +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
ulferts 158f3e4e3a remove methods no longer in use - especially pagination 2023-10-02 22:50:43 +02:00
Christophe Bliard fb6c296428 Lift name length limit of some models
Role name being limited to 30 characters does not work anymore with some
translations of default seeded roles. Raising the limit to 256
characters like a lot of other models.
2023-05-16 15:08:28 +02:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Oliver Günther e4df121ca4 Implement hasReadonlyStatus 2022-06-15 11:09:36 +02:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Christophe Bliard a33524ef6d remove ruby magic comment for utf-8
ruby interprets source encoding as utf-8 since 2.0.0, making magic comment redundant and useless
2022-03-10 19:36:58 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +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 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01: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 4bb47cd935 [33750] Ensure default statuses can not be set read only
https://community.openproject.com/wp/33750
2020-09-04 06:44:59 +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
ulferts 6c4e572f4e consolidate allowed_* logic in the wp contract 2019-12-02 09:28:02 +01:00
ulferts c83ba63640 Revert revert unwanted in dev branch
This reverts commit b05a8f7b54.

The release/10 branch received a revert that was applied after changes
from dev unwillingly where merged into it. But when merging release/10.0
back into dev, that revert was also applied to dev where the changes are
indeed wanted. So we revert the revert for dev.
2019-09-20 08:36:05 +02:00
Oliver Günther b05a8f7b54 Revert "[31080] Trigger wpEvent after custom action" 2019-09-18 14:28:33 +02:00
ulferts e7263fcedb migrate to rails 6.0.0 2019-09-12 16:14:51 +02:00
ulferts cc0145daf6 prevent useless edits to wp status
In case the fixed version and the status of a work package are both closed, the status of a work package cannot be altered any more. Attempting it will result in an error.

Before the fix, the possible status calculation would not factor in that situation and the status would be marked as writable regardless as well. Therefore, the frontend would display a list of statuses even though selecting one would do nothing at all.

Now, the status property is marked as non writable in such a situation and the status list will only contain the current status. As we only fetch the form after a click on the edit field, we can only disable the field after that which is a bit weird.
2019-06-21 15:18:32 +02:00
Oliver Günther 5de0b9a2d8 Go through brakeman warnings 2019-04-30 11:26:11 +02:00
Oliver Günther 3ba6913960 Implement read-only work package attributes based on status 2018-11-12 08:19:19 +01:00
Oliver Günther f254c9ea71 Merge remote-tracking branch 'origin/dev' into housekeeping/colors 2018-06-14 07:50:44 +02:00
Oliver Günther 0c2851a579 Rewrite Type#statuses to always return AR relation 2018-05-25 07:45:34 +02:00
Oliver Günther e77aae007b Rename PlanningElementTypeColors => Colors and add autocomplete 2018-05-11 14:17:50 +02:00
Oliver Günther 2f0e9c1c07 Add color to status 2018-05-09 20:25:21 +02:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
Jens Ulferts 1d66745a5d fix additional workflows for assignee and roles 2017-07-20 20:49:07 +02:00
Jens Ulferts 30bf9a5199 code prettification 2017-07-20 20:49:07 +02:00
ulferts c0b709530c Fix/replace deprecations (#5533)
* replace alias_method_chain

* remove deprecation silencing

* bump controller-testing

* introduce permitted params for settings

* replace various deprecations in controllers

* remove deprecation silencing for legacy_specs

* remove `puts` from spec

* replace deprecated access to errors

* remove unnecessary AR::Parameters usage in spec

* specify error to expect

* replace deprecations

* replace deprecated action calls in legacy function specs

* replace deprecations in functional controller tests

* replace deprecations in controllers/controller_specs

* remove params parser which does not seem to be in effect

It is registered for the content type :exclude which makes no sense as it should deal with :json. The desired behaviour of the api dealing with parsing errors is working with or without the code.

* replace deprecations in unit specs

* replace alias_method_chain

[ci skip]
2017-07-19 21:17:37 +02:00
Oliver Günther 7cf11bb689 Update copyright notice 2017-01-10 15:11:43 +01:00
Mohamed Wael Khobalatte 972b04d86e Refactor to allow for strong params
We no longer need attr_accessible.
2015-10-23 14:33:55 +02:00
Alex Coles b2790b8db1 Migrate deprecated .update_all with conditions
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 22:01:03 +02:00
Alex Coles 355e7e0ff4 Replace deprecated calls to Model#connection 2015-06-30 21:55:23 +02:00
Alex Coles 5557f58e80 Migrate model scopes to use lambda/block
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 12:12:55 +02:00
Alex Coles 064d66449a Migrate AR finder/query methods in models
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 12:12:51 +02:00
Alex Coles df51b6ed99 Fix syntax (w/Rubocop) in (Rails) models
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 12:08:28 +02:00
Alex Coles e0191e759c Update year in copyright header to 2015
[ci skip]
2015-01-01 00:02:57 +00:00
Alex Coles 1d1ec0ef37 Prefer #map over #collect in (Rails) models
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-04 11:24:51 +01:00
Alex Coles 6fe9535b1f Fix syntax (w/Rubocop) in (Rails) models
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 22:15:11 +01:00
Alex Coles 721101ed25 Use 1.9+ Hash syntax in (Rails) models
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 22:15:11 +01:00
Johannes Wollert 8b096975fe updates copyright headers
updates more copyright

more copyright headers
2014-02-27 16:39:51 +01:00
Sebastian Schuster 9b2214589d Added default sorted scope to Status, so whenever statuses are
retrieved without any ordering parameter, they should be sorted
automatically
2014-02-25 09:53:49 +01:00