228 Commits

Author SHA1 Message Date
Ivan Kuchin b648341030 [#74768] Remove calculated_value_project_attribute feature flag
https://community.openproject.org/wp/74768
2026-05-19 17:42:42 +02:00
Tomas Hykel 53a557678f fix the test 2026-05-07 22:43:42 +02:00
Tomas Hykel 8e70767c5f fix: Correctly handle wp_sequence_counter on project copy 2026-05-07 22:12:27 +02:00
Klaus Zanders a66bc91c63 Include all permission dependencies, add a factory for the role with the correct permissions 2026-05-04 11:15:43 +02:00
Klaus Zanders ba64d8ff56 Ensure that only roles with fitting permissions can be used as the role for the project creator 2026-05-04 10:20:24 +02:00
Oliver Günther 91fa44a109 Reupload artifact when stepping through wizard again
Refactoring the Create service to make it more readable, by introducing
a separate service for this.

https://community.openproject.org/work_packages/72550
2026-03-17 11:38:52 +01:00
Eric Schubert b07931364c [#69991] add unit test cases 2026-02-18 16:20:40 +01:00
Dombi Attila 05754e0607 Add Create Artifact WorkPackage Service journal notes spec when assignee is not set 2026-02-10 15:24:41 +02:00
Oliver Günther 57b69c26f5 Allow groups to be assigned to PIRs 2026-02-09 14:37:23 +01:00
Oliver Günther 738e081aa5 Remove feature flag 2026-01-29 09:07:53 +01:00
Alexander Brandon Coles 8c6676b92e Merge branch 'dev' into merge-release/17.0-20260112162124 2026-01-12 13:24:48 -03:00
Christophe Bliard 63afc1c90b Merge pull request #21325 from opf/bugfix/69448-send-assignee-notification-email-only-once-after-pir-completion
[69448] Send assignee notification email only once after PIR completion
2026-01-12 16:48:55 +01:00
Alexander Brandon Coles 6455afca7c Merge branch 'dev' into merge-release/17.0-20260108132255 2026-01-08 10:26:08 -03:00
Tobias Dillmann 587333e79a [#70106] Activate a default field if the value is explicitly set
... even if it is identical to the default value
2026-01-07 15:01:07 +01:00
Tobias Dillmann 0caf637c6c [#70106] Use table in custom field spec 2026-01-07 15:01:07 +01:00
Tobias Dillmann edd06fb115 [#70106] Do not force-activate custom fields with a default value 2026-01-07 15:01:07 +01:00
Christophe Bliard 3b34c11d09 [69448] Send assignee notification email only once after PIR completion
https://community.openproject.org/wp/69448

In `WorkPackages::CreateService`, the work package was saved twice:
first time at creation, second time when rescheduling related work
packages, which includes self.

Each save created a `WorkflowJob`. Normally this is ok, but if there are
mentions in the description or journal_notes, and if the two jobs are
processed in parallel (in different GoodJob threads), this leads to
having the mention notification email sent twice. Indeed, each one will
try to create the notifications and send them. The `mail_alert_sent`
flag on the notification is not set to `true` until one mail has been
sent.

To fix it, the work packages that have not been changed after
rescheduling related work packages are filtered out. This guarantees
there is only one single save in the nominal cases where there are no
related work packages that would force a second save of the work
package. Single save -> single mention notification email.
2026-01-07 10:56:13 +01:00
Christophe Bliard 9dd648387d Use copy_of helper in specs
And remove the usage of `project_copy.work_packages[0]` which can lead
to false positives 😱 when there are more than one element copied.
2026-01-06 16:38:23 +01:00
Christophe Bliard 8dd148e640 [70290] Project copy nilifies user fields if members are excluded
https://community.openproject.org/wp/70290

This fixes the regression introduced in 5ea185ef66: the
`possible_principal_id` was run against the source project instead of
the target project, leading to always return something.

Fix is to always run `possible_principal_id` against the target project.

This was not detected by the unit tests: original tests were taking the
first work package of the copied project to check that the user field
was nil, assuming the first work package would be the copy of the one
having the user field set, but actually the work package was not copied,
so another work package is picked and this one has all user fields nil
because the original work package has all user fields nil.

The test was fixed by explicitly getting the copied work package using
the subject of the original work package, and failing if the copied work
package is not found.
2026-01-06 16:19:57 +01:00
Alexander Brandon Coles eec61a8b1b Merge branch 'dev' into merge-release/17.0-20251224035028 2025-12-24 20:31:01 -03:00
Oliver Günther be6297ecdf Take over creation_wizard flag in project mappings 2025-12-23 14:52:52 +01:00
OpenProject Actions CI c7d88c5c2d Merge branch 'release/17.0' into dev 2025-12-18 14:13:56 +00:00
Tobias Dillmann 68dda34004 [#69399] Make specs green 2025-12-12 09:59:51 +01:00
OpenProject Actions CI 4127fd7f7b Merge branch 'release/17.0' into dev 2025-12-11 03:50:41 +00:00
Oliver Günther 1289d761d6 Allow excluding roles on template copy 2025-12-10 08:30:15 +01:00
Oliver Günther aa4ad76615 Merge remote-tracking branch 'origin/release/17.0' into dev 2025-12-09 08:59:49 +01:00
Oliver Günther 6221e90a6b Use the same call for storage upload service 2025-12-09 08:58:59 +01:00
OpenProject Actions CI ecf6b3752a Merge branch 'release/17.0' into dev 2025-12-09 03:48:44 +00:00
Oliver Günther 3aa5275567 Merge pull request #21214 from opf/feat/workflow-work-package
Recreate artifact on status change
2025-12-08 14:08:55 +01:00
OpenProject Actions CI df49eaa1d3 Merge branch 'release/17.0' into dev 2025-12-08 09:08:26 +00:00
Oliver Günther 5d9272818a Ensure we take over the project role in members dependent service 2025-12-04 18:42:17 +01:00
as-op 14993e967d [#69426] Use a fixed pattern for the PIR PDF filename
https://community.openproject.org/work_packages/69426
2025-12-04 11:25:29 +01:00
Oliver Günther 0dd5ce5942 Merge remote-tracking branch 'origin/release/17.0' into dev 2025-12-02 16:37:59 +01:00
Oliver Günther 4a3d90e9ba Use the default language for generating the file name of the artifact (#21301)
* Use the default language for generating the file name of the artifact

* Update spec/services/projects/create_artifact_work_package_service_spec.rb

Co-authored-by: Mir Bhatia <m.bhatia@openproject.com>

---------

Co-authored-by: Mir Bhatia <m.bhatia@openproject.com>
2025-12-02 16:20:11 +01:00
OpenProject Actions CI 2b4ee460e8 Merge branch 'release/17.0' into dev 2025-11-29 03:46:48 +00:00
Dombi Attila 2ca5a2e712 [#69495] The Project Initiation Request fails when the artifact work package has a required custom field
https://community.openproject.org/work_packages/69495
2025-11-28 12:56:45 +02:00
Andrej Sandorf cc1a649472 Merge branch 'dev' into implementation/69426-use-a-fixed-pattern-for-the-pir-pdf-filename 2025-11-27 09:04:06 +01:00
as-op b8ad7418cc obey rubocop 2025-11-26 17:22:51 +01:00
as-op 22707615c2 Merge remote-tracking branch 'origin/implementation/69426-use-a-fixed-pattern-for-the-pir-pdf-filename' into implementation/69426-use-a-fixed-pattern-for-the-pir-pdf-filename 2025-11-26 17:10:22 +01:00
as-op e2e7fd9ef2 specs: adjust PIR filename expectations 2025-11-26 17:10:09 +01:00
Oliver Günther 2038feea50 Remove secure_headers patch no longer needed since switching to rails 2025-11-26 16:40:47 +01:00
Oliver Günther 6fc97cf04f Add PIR submission email 2025-11-26 16:40:00 +01:00
Oliver Günther 3b1aface65 Improve PIR description template 2025-11-26 16:27:22 +01:00
Christophe Bliard 3d2a567231 Skip creating another artifact work package if one already exists
https://community.openproject.org/wp/68862
2025-11-26 16:17:54 +01:00
Oliver Günther 36c9c03515 Add spec 2025-11-26 16:17:43 +01:00
Christophe Bliard d50829aa6d Merge pull request #21203 from opf/hotfix-project-init
Associate artifact file link to artifact work package, not project
2025-11-26 14:48:51 +01:00
Jan Sandbrink b876177671 Associate file link to WP, not project
The file link was errorneously added to the project instead
of the work package.
2025-11-26 14:37:03 +01:00
Mir Bhatia fe1feeca11 Add link to wizard to WP description and comment 2025-11-26 13:28:21 +01:00
Oliver Günther 7681aaf64c Merge without success 2025-11-25 16:25:25 +01:00
Oliver Günther 944b95303d Use Date.current 2025-11-25 16:22:48 +01:00