65 Commits

Author SHA1 Message Date
Oliver Günther 27817f2871 Explicitly call journable.visible? on the diff controller 2026-05-18 11:28:51 +02:00
Ivan Kuchin 41d82d8322 Merge pull request #21452 from opf/feature/64264-comment-fields-for-project-attributes
Feature/64264 comment fields for project attributes
2026-02-25 20:45:14 +01:00
Ivan Kuchin 99dfd83868 test showing diff of custom comments 2026-02-25 20:07:15 +01:00
Ivan Kuchin 32c9f39acf test showing journal diff for deleted custom fields 2026-02-25 20:07:15 +01:00
Ivan Kuchin b1a63aad5b cleanup testing project custom fields in journals controller 2026-02-25 20:07:15 +01:00
Ivan Kuchin 77e48d3e57 extract shared example for when diff is shown 2026-02-25 20:07:14 +01:00
Ivan Kuchin 068432c592 shorten custom value assignment in journals controller spec 2026-02-25 20:07:14 +01:00
as-op 0b98d75179 [#72446] Create journal entries for issue history
https://community.openproject.org/work_packages/72446
2026-02-25 11:21:42 +01:00
Ivan Kuchin be3f82ba95 [#66925] Activity shows changes to admin only custom fields also to non admin users
https://community.openproject.org/work_packages/66925
2025-08-26 19:44:38 +02:00
Alexander Brandon Coles 51213056b0 Replace .hidden-for-sighted with Primer's .sr-only
See (docs): https://primer.style/css/storybook/?path=/story/utilities-layout--screen-reader-only
See (source): https://github.com/primer/css/blob/main/src/utilities/visibility-display.scss#L96
2025-07-21 11:25:24 +01:00
Jan Sandbrink 0b87e7543f Freeze string literals in specs
Rolling out frozen string literals further by freezing all
string literals in core specs.
2025-05-05 09:29:55 +02:00
Oliver Günther 1cf80976e7 Fix white-space display in Journal diff (#16810)
* Add test for newlines

* Fix html_safe_gsub
2024-09-25 16:12:00 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Ivan Kuchin 53e38fb1b5 use heredocs for clarity in journals controller spec 2024-07-30 15:16:00 +02:00
Ivan Kuchin 9f97fbbfea custom field formatter related specs 2024-07-30 15:06:25 +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
Klaus Zanders 78c1e4fadb Switch all uses of principal factories to use new interface 2023-10-09 10:39:44 +02:00
Christophe Bliard 4c2a9d0aa8 Enable RSpec zero monkey patching mode
The plan for RSpec 4.0 is to disable monkey patching.

See https://github.com/rspec/rspec-core/blob/main/features/configuration/zero_monkey_patching_mode.feature for details.
2023-05-31 19:22:29 +02:00
Christophe Bliard 0e634e24d9 refactor: Simplify logic to validate params 2023-02-06 09:32:44 +01:00
Christophe Bliard 78b3c94ecb Handle finer permissions for journals/diff endpoint
As description of both WorkPackage and Project journal can be diffed,
the needed permissions have to be distinct: view_project for Project
description diff, and view_work_packages for WorkPackage description
diff.
2023-02-06 09:30:32 +01:00
Christophe Bliard 85b3258a29 Autocorrect with some rubocop cops
RSpec/Rails/InferredSpecType and Style/RedundantConstantBase

rubocop --autocorrect-all --only RSpec/Rails/InferredSpecType,Style/RedundantConstantBase spec modules/*/spec
2023-01-13 14:28:59 +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
Christophe Bliard 47a297daae Fix argument alignment since f08bea3467 (#10129)
* Fix argument alignment since f08bea3467

The FactoryBot.* prefix has been removed in f08bea3467. Since then
rubocop complains about Layout/ArgumentAlignment. This commit fixes it.

* do not fix alignments for modules/*/spec yet

hoping to be under the limit of 65535 characters for reviewdog to report on rubocop errors
2022-02-02 21:48:06 +01:00
Oliver Günther f08bea3467 Remove FactoryBot.* prefix where applicable 2022-01-25 08:19:06 +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
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Oliver Günther 183ad1480e Replace deprecated controller success? with succesful? 2018-12-03 10:31:58 +01:00
Oliver Günther 059770f533 FactoryGirl => FactoryBot
Removes the deprecation
2018-05-07 22:38:20 +02:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
Oliver Günther 7cf11bb689 Update copyright notice 2017-01-10 15:11:43 +01:00
Oliver Günther 92aebdcec4 Fix params deprecation
Fixes in spec/controllers:

```
DEPRECATION WARNING: ActionController::TestCase HTTP request methods will accept only
keyword arguments in future Rails versions.
```
2016-10-17 11:56:44 +02:00
Oliver Günther 9093be6730 Remove journal notes edit and preview 2016-05-02 07:46:54 +02:00
Henriette Dinger 9122629749 Add hidden labels for screenreader 2016-04-01 11:55:57 +02:00
Alex Coles efdfcf82e4 Fix typo in JournalsController spec
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-08-19 19:17:24 +02:00
Oliver Günther 471fc04663 Fix ActionController::InvalidCrossOriginRequest in specs
https://github.com/rails/rails/pull/13345 introduced CSRF protection
to gets with JavaScript responses.
2015-08-19 16:28:57 +02:00
Alex Coles 3785fdc9ed Use #describe, #context with String arg not symbol
The semantics of `describe` have changed in RSpec 3: passing a symbol
rather than a string will change the value of the described object.

See discussion here: https://github.com/rspec/rspec-core/issues/1114

Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-03-11 01:13:11 -03:00
Jens Ulferts 8bf932f1a8 Merge branch 'release/4.0' into dev
Conflicts:
	app/controllers/journals_controller.rb
	spec/controllers/journals_controller_spec.rb
	spec/controllers/reportings_controller_spec.rb
2015-02-05 13:22:36 +01:00
Florian Kraft 22853c8b46 Fix the coding style via rubocop 2015-02-04 17:01:17 +01:00
Florian Kraft cb2f3f30d6 Fix error where anyone could read the diff of a WP
With this fix it is no longer possible to view a description diff
without the necessary permissions.

The error was reported by Jan Sandbrink in
https://community.openproject.org/work_packages/16974.
2015-02-04 16:57:53 +01:00
Alex Coles e0191e759c Update year in copyright header to 2015
[ci skip]
2015-01-01 00:02:57 +00:00
Alex Coles 5afc11f19e Fix syntax (w/Rubocop) in specs
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-04 00:50:36 +01:00
Alex Coles 03978767be Use 1.9+ Hash syntax in specs
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 23:49:02 +01:00
Alex Coles 9b4b6b5e6b Merge branch 'dev' into feature/rspec-299
Signed-off-by: Alex Coles <alex@alexbcoles.com>

Conflicts:
	spec/controllers/account_controller_spec.rb
	spec/controllers/versions_controller_spec.rb
	spec/models/project/copy_spec.rb
	spec/representers/work_package_representer_spec.rb
2014-08-07 11:02:07 +02:00