66 Commits

Author SHA1 Message Date
Oliver Günther f695883e27 Properly authorize bulk actions
https://community.openproject.org/work_packages/73345
2026-03-23 14:33:08 +01:00
Alexander Brandon Coles f15be6e07f Freeze string literals in app/controllers
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/controllers
2025-07-18 17:51:00 +01:00
Kabiru Mwenja b52debb70d Style/ItBlockParameter: Use it block parameter.RuboCopStyle/ItBlockParameter (#19318) 2025-06-26 13:36:49 +03:00
Henriette Darge ee8452282a [63485] Remove show_local_breadcrumb and default_breadcrumb (#18663)
* add a new helper for breadcrumb in wiki page

* set page header in destroy page

* set page header in edit page

* set page header in history and rename and edit parent pages

* change toolbar items into page header items

* add new wiki action to sub header

* remove version edit page which is not in use any more

* add export as a menu item of the header

* fix rubocup errors

* fix failing tests

* replace page header in annotate page

* replace page header in diff page

* add page header in select menu page

* fix rubocup errors

* fix errors on rename test

* fix errors on selecting items from toolbar

* fix errors on tests for child pages

* set correct permission for configure menu item

* replace page header in summary page

* replace page header in summary details page

* edit docs of sub header

* add page header in wiki new page

* remove controller and a route for edit method

* undo changes for docs of sub header

* extract header in show page into a new component

* use helper method in header component

* add wiki module to the breadcrumb

* rename page header component for wiki page

* simplify how lock and lock implemented

* extract sub header

* remove wiki title from header of history page

* fix page header in new page

* use page.find_test_selector in test

* fix failing test for summary page

* fix failing test for wiki child pages

* change the summary test

* use test selector for page header title

* undo changes for activate user in admin

* use test selector in adding editing history test

* use test selector in attachment upload test

* use test selector in child pages tests

* use test selector in wiki menu items tests

* change test selector for breadcrumbs

* extract conditions to show edit button into a method

* extract conditions to show rollback action menu item into a method

* extract conditions to show create button into a method

* fix duplicated code in test

* Remove outdated `show_local_breadcrumb` method which is replaced by the Primer::PageHeader breadcrumb

* Remove `default_breadcrumb` method as it serves no prupose any more

* Remove the old breadcrumb and its hook completely

* remove breadcrumbs path from rename

* fix translations errors in storages

* undo changes on translations

* remove default breadcrumbs in time tracking controller

---------

Co-authored-by: Behrokh Satarnejad <b.satarnejad@openproject.com>
Co-authored-by: Behrokh Satarnejad <62008897+bsatarnejad@users.noreply.github.com>
2025-04-23 10:40:43 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Aaron Contreras 2a2900e60d Reference work package records instead of hierarchy 2024-06-24 12:00:19 -05:00
Aaron Contreras c1a98ed488 Account for children work packages when warning project moves 2024-06-21 10:26:53 -05:00
Aaron Contreras c247323345 Fix logic for determining whether the warning should be displayed 2024-06-20 13:47:45 -05:00
Aaron Contreras e328641aec Warn user that the type is not available in target project
Displays a warning toast letting the user know to activate the current
types of the work packages under move in the target project and
making the "auto-reassign" behavior known to them so they can better
take a decision when performing moves.
2024-06-18 10:15:51 -05: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
Oliver Günther ef5f78ee8a Allow bulk move/copy actions to happen in the background
https://community.openproject.org/wp/46476
2023-03-01 14:30:39 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Dombi Attila 8d46af092c [#43553] Move workpackage in other project error
https://community.openproject.org/work_packages/43553
2022-11-01 12:46:07 +02:00
ulferts 2c53db040f fix unsetting the assignee/responsible on bulk copy 2022-08-30 18:00:52 +02:00
ulferts 491928a3fd replace typed_dag with closure_tree and CTE 2022-03-29 12:02:55 +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 409900411e Merge origin/release/12.0 2021-12-22 14:18:11 +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
ulferts 5968c0b18a Fix/replace custom i18n function (#8681)
* replace custom i18n function calls

* remove custom i18n method
2020-09-16 11:26:15 +02:00
Oliver Günther 01954c26bc Refactor copy services to use shared state 2020-07-10 15:41:03 +02:00
ulferts 4cb0d0ff91 Feature/delayed bcf export (#8275)
* delayed bcf export

* remove unnecessary eager loading

* Update rxjs polling statement with loading indicator

* Avoid error handling due to JSON parsing

* delay all wp list exports

Co-authored-by: Oliver Günther <mail@oliverguenther.de>

[ci skip]
2020-04-20 16:16:01 +02:00
ulferts 0b15db3c9a rename fixed_version to version 2020-03-27 09:10:44 +01:00
ulferts 95fd58cff7 replace order_by_date with order_by_semver_name 2020-03-24 23:17:27 +01:00
Oliver Günther be57f050fc [32267] Allow setting version on bulk copy
https://community.openproject.com/wp/32267
2020-02-14 11:36:03 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
ulferts 1850622f20 Feature/versions api update (#7299)
Feature/versions api update

[ci skip]
2019-05-22 10:29:06 +03:00
Oliver Günther 33bc6466d5 Fix some sentry issues 2019-04-19 21:04:20 +02:00
Oliver Günther 665f37816d On bulk copying, collect errors from dependent results
Otherwise, when errors exist in children, only the parent will be marked
invalid, but not the actual child that caused the error.

https://community.openproject.com/wp/29298
2019-01-25 13:21:09 +01:00
Oliver Günther ecd6b3b996 [27934] Avoid bulk copying children more than once
All descendants of work packages are automatically copied by the
`MoveService`. We can skip them by checking the ancestors of each work
package beforehand.

https://community.openproject.com/wp/27934
2018-07-20 15:26:23 +02:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
Jens Ulferts 690e0ffc60 wp create/update/destroy via services 2017-11-29 15:27:29 +01:00
Oliver Günther 7cf11bb689 Update copyright notice 2017-01-10 15:11:43 +01:00
Oliver Günther fe0e8dd919 Rename before_filter to before_action 2016-09-06 15:40:49 +02:00
Oliver Günther 29f749a489 Remove unused xhr check 2016-08-23 10:21:46 +02:00
Oliver Günther 8b0cd01d9c Use back_url for bulk move, copy, and edit
This sets the back_url to wherever the bulk request originated from,
allowing users to be redirected to their old work package, query, or
table.

Note that this does not simply work for bulk destroy, since users may
use that functionality from split/full view and will in this case be redirected
to a non-existing resource.
We might pass a query_id in this case (to at least redirect back to queries), however it would be better if the
frontend decided what path the user should be redirected to in this
case.
2016-02-08 13:28:19 +01:00
Jens Ulferts be21a7a504 update error message for bulk operations across multiple projects 2015-12-04 10:57:53 +01:00
Alex Coles 53a224bf76 Remove mutation method calls on AR::Relation
See:
* 6eeea9d1
* http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#mutator-methods-called-on-relation

Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-08-19 19:20:39 +02:00
Alex Coles e4c87bc2b4 Merge branch 'dev' into feature/rails4
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-08-08 19:44:58 +01:00
Jens Ulferts bdf20ef94d extract work package move/copy to own service 2015-08-03 15:39:08 +02:00
Jens Ulferts 309254bf20 explicitly hand over the current user 2015-08-03 15:39:07 +02:00
Alex Coles 57618b25ec Replace dynamic finder usages with #find_by, etc.
This patch replaces all dynamic finders, for the sake of consistency,
although only some methods are deprecated. See:
https://github.com/rails/activerecord-deprecated_finders#active-record-deprecated-finders

* Revert some `User#find_by_login` usages in cuke steps accidentally
  removed in 74228b59.

User Story # 20325

Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 11:50:26 +02:00
Jan Sandbrink d3ceffddfc actually allow the status to be set while moving
apparently the status_id param was set to expect an array of values while being moved in this commit: d7f399ab8d
Probably because the spec started to expect that when it was moved to be an RSpec test.
I am not sure if this was ever a valid thing outside the tests...
2015-06-26 16:14:09 +02:00
Alex Coles e0191e759c Update year in copyright header to 2015
[ci skip]
2015-01-01 00:02:57 +00:00
Alex Coles bb0e6e6aa5 Fix syntax (w/Rubocop) in (Rails) controllers
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 22:15:11 +01:00