82 Commits

Author SHA1 Message Date
Tom Hykel 2e01aff2a3 Merge pull request #23325 from opf/bug/74927-unable-to-change-a-parent-on-bulk-edit-of-work-packages-with-semantic-id
[#74927] Unable to change a parent on bulk edit of work packages with semantic ID
2026-06-03 13:39:06 +02:00
Tom Hykel afe7550851 Merge pull request #23366 from opf/fix/74928-numeric-id-instead-of-semantic-one-on-th
fix(ui): Numeric ID instead of semantic one on the error message on bulk edit (WP #74928)
2026-06-02 17:24:18 +02:00
Tomas Hykel 2ad4ea078a fix(ui): Numeric ID instead of semantic one on the error message on bulk edit (WP #74928) 2026-05-26 23:47:59 +02:00
Tomas Hykel 529bd77587 fix(ui): Numeric ID instead of semantic one in bulk edit work packages (WP #74926) 2026-05-26 23:31:44 +02:00
Tomas Hykel 3fbad33ee1 [#74927] Unable to change a parent on bulk edit of work packages with semantic ID
https://community.openproject.org/wp/74927
2026-05-22 19:10:26 +02:00
Klaus Zanders 5ffcb63e05 Remove GET route for bulk delete 2026-02-02 11:50:26 +01:00
Dombi Attila 652551d537 [#68040] Switching a multi select list cf to a single select cf of projects breaks opening the editing modal on the overview page
https://community.openproject.org/work_packages/68040

Change the custom_value_for method signature to always use a custom field.
2025-11-12 20:25:16 +02:00
Oliver Günther 0dae9a7c9a Restore functionality of bulk edit done_ratio 2025-08-29 11:45:27 +02:00
OpenProject Actions CI 21ddc6700a Merge branch 'release/16.0' into dev 2025-05-12 08:42:25 +00:00
Christophe Bliard 16d7501e77 Make expectation more explicit
Co-authored-by: Klaus Zanders <klaustopher@users.noreply.github.com>
2025-05-12 10:13:34 +02:00
Christophe Bliard 6574e2a479 [63831] Fix error 500 when bulk deleting related work packages
https://community.openproject.org/wp/63831

When bulk deleting work packages, successors of descendants are
rescheduled, because as they have one less predecessor, they may need to
be switched to manual scheduling mode.

Problem: if one of these successor to reschedule is also a child of the
deleted work package, then it cannot be rescheduled: it's deleted. When
trying to rescheduled and save it, the error
`ActiveRecord::StaleObjectError` is raised.

Solution: only reschedule successors that are not descendants of the
deleted work package.
2025-05-09 18:01:48 +02: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
Christophe Bliard 1517b7cee0 [59539] Reschedule related work packages when deleting
From the deleted work package, its parent, its successors, and the
successors of its descendants are rescheduled and switched to manual
scheduling if appropriate.
2025-02-25 09:18:28 +01:00
Christophe Bliard aaddc7067f Make test faster by using shared_let helper
from 19 secs to 10 secs.
2025-02-25 09:18:28 +01:00
Christophe Bliard 2d7288d317 [59539] Make work packages manually scheduled by default
The `schedule_manually` column is also non-nullable now.

This includes the following changes:

- Automatically scheduled parent dates are and `ignore_non_working_days`
  attributes are now always derived from children's values, even if the
  children are scheduled manually.

  It's more natural. Without that, adding a child to a work package
  would not change the parent's dates.

  As a consequence, the parent can start on a non-working day if one of
  its children is manually scheduled, ignores non-working days, and
  starts on a non-working day. That's why the parent's
  `ignore_non_working_days` attribute is now also derived from all its
  children regardless of the scheduling mode.

  If the parent is manually scheduled, its dates and it's ability to
  ignore non-working days will still be defined independently from its
  children.

- Fix tests broken by scheduling mode being manual by default.

  The tests had to be adapted to explicitly set scheduling mode to
  automatic for followers and parents, and sometimes even follower's
  children. Without it, work packages would not be rescheduled
  automatically.

- Replace schedule helpers with table helpers.

  Schedule helpers helped well, but table helpers are more flexible and
  support more column types.

- Add "days counting" and "scheduling mode" columns to table helpers.

  "days counting" to set `ignore_non_working_days` attribute.
    - "all days" value maps to `ignore_non_working_days: true`.
    - "working days" value maps to `ignore_non_working_days: false`.
  "scheduling mode" to set `schedule_manually` attribute.
    - "manual" value maps to `schedule_manually: true`.
    - "automatic" value maps to `schedule_manually: false`.
2025-02-25 09:12:22 +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
ulferts 5b2bc41f41 Merge remote-tracking branch 'origin/dev' into easier-factory-role-setup 2023-10-12 12:09:27 +02:00
ulferts 2b2abf864a introduce ProjectRole model 2023-10-09 14:34:20 +02:00
Klaus Zanders 78c1e4fadb Switch all uses of principal factories to use new interface 2023-10-09 10:39:44 +02:00
Christophe Bliard df827db627 Refactor CustomField factories using traits
Reduce duplication and harmonize the factory names:
- bool/boolean => boolean
- int/integer => integer

Co-authored-by: Aaron Contreras <aaronlcaq@gmail.com>
2023-08-29 08:57:39 +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 393d71373f lint: Make rubocop happier 2023-03-07 15:47:03 +01:00
Christophe Bliard aa23106c11 lint: autocorrect RSpec/FactoryBot/ConsistentParenthesesStyle
command is

    rubocop -A --only RSpec/FactoryBot/ConsistentParenthesesStyle modules spec
2023-03-07 15:04: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 03dac03c09 Journalize project attributes 2022-12-06 15:07:43 +01:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
ulferts 491928a3fd replace typed_dag with closure_tree and CTE 2022-03-29 12:02:55 +02:00
ulferts d18f60aefe replace assignable column on role 2022-03-03 12:50:24 +01: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 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 2a015eeac3 Feature/journal aggregation on write (#9396)
* aggregate journals on write - simple implementation

* remove references to aggregated journals on read

* rewrite existing journals to be aggregated

* remove aggregated journal reference

* only delete predecessor if it can be aggregated

* fix aggregation condition

* adapt specs

* remove aggregated journal functionality from production code

The code is still necessary in a migration for the time being

* adapt specs

* use polymorphic belongs_to for journal data

The association can then be employed for eager loading

* eager load for activity rendering
2021-06-17 20:08:58 +02:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01:00
luz paz e8c2928a12 Fix typo beeing->being in spec/ and modules/ 2021-01-27 13:52:37 +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 6826f90ee2 Feature/remove timelog (#8557)
* rename costs, introduce budgets

* move files from costs to budgets

* rename cost_object to budget

* remove unused code

* move hook - should be turned into standard code in the long run

* move type attributes change over to budgets

* move patch to work_package proper

* move budget menu item up

* combine reporting, time and cost module

* remove rails based time_entries & reports code

* rename cost object filter

* adapt menu spec expectations

* use cost project module name in administration

* include timeline labels in migration

* properly place budget linking method

* fix permitted params

* remove outdated routing spec

* adapt budget request specs

* ensure order of descendent updates

* remove outdated specs

* fix checking for reporting to be enabled

* fix displaying spent units

* fix time entries activity event url

* reenable current rate tab

* fix path on budget page

* allow bulk editing of budgets only in one project scenario

* fix sanitizing reference in controller

* include module required for format_date

* fix reference to correct units from work package spent units

* linting

* remove outdated spec

* remove outdated views and permission references

* remove acts_as_event from time_entries

There is no atom link for time entries

* remove acts_as_event from projects

There are no atom links for projects

* introduce budget filter for cost reports

* remove actions added to removed controller

* move time entries to the costs module

* factor in view_own permission when calculating time entry visibility

* linting

* move mounting of time entries

* include budgets into api v3 documentation
2020-08-18 08:24:34 +02:00
ulferts 0b15db3c9a rename fixed_version to version 2020-03-27 09:10:44 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
ulferts 6c3c7003e2 provide necessary permissions in specs 2019-05-31 20:36:34 +02:00
ulferts a93ecca5a8 Feature/members api show (#7308)
* basic members collection response

* complete member index end point

* document versions#index

* remove user association from members

There is already a more generic principals association. Having both causes confusion and leads to duplicate loading of models

* linting

* remove disabled test

* add members#show api end point

* add project and principal to member representer

* replace member.user reference with principal

* use principal reference in project members association

* modernize roles api

* complete member representer rendering

* replace remnants of user association

* add member schema api endpoint

* have dedicated available projects end point for versions

* linting

* limit roles to assignable ones in schema

* rename member to membership in api

* remove remnants of user in member

* spec fixes

* use available_projects endpoint in versions board

* add eager loading to memberships#index

* members create form api endpoint

* ensure role exists for default assignment

* extract switch for users/groups to work_packages representer

* document membership create form

* add l10n expected in specs

* strengthen the usage of a delete base service

* use base class for set attributes service

* fix alias in service

* add create endpoint to members api

* document members create endpoint

* linting

* adapt to altered service signature

* use default endpoint for wp#get

* use CF infused representer


[ci skip]
2019-05-29 09:31:56 +03:00
Oliver Günther 1bc3090952 Better errors when bulk editing 2019-02-18 08:22:33 +01:00
Oliver Günther 183ad1480e Replace deprecated controller success? with succesful? 2018-12-03 10:31:58 +01:00
Oliver Günther 661ea179a1 [28670] Use WP update service for bulk updating
The update service handles scheduling and ancestry updates, so we can
avoid doing that manually.

Fixes https://community.openproject.com/wp/28670
2018-11-01 11:42:43 +01:00