Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[62178] Rename "bulk copy" to "bulk duplicate"

Christophe Bliard075430d15468
diff --git a/app/services/projects/copy/work_packages_dependent_service.rb b/app/services/projects/copy/work_packages_dependent_service.rb
index 8ce9a255d23..b3462215eaf 100644
--- a/app/services/projects/copy/work_packages_dependent_service.rb
+++ b/app/services/projects/copy/work_packages_dependent_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
@@ -87,7 +89,7 @@ module Projects::Copy
.new(user:,
work_package: source_work_package,
contract_class: WorkPackages::CopyProjectContract)
- .with_state(bulk_copy_in_progress: true)
+ .with_state(bulk_duplicate_in_progress: true)
.call(
copy_attachments: copy_attachments?,
copy_share_members: copy_shares?,
diff --git a/app/services/work_packages/bulk/copy_service.rb b/app/services/work_packages/bulk/copy_service.rb
index 2a3a749be40..6ef24ba956f 100644
--- a/app/services/work_packages/bulk/copy_service.rb
+++ b/app/services/work_packages/bulk/copy_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
@@ -111,7 +113,7 @@ module WorkPackages
WorkPackages::CopyService
.new(user:,
work_package:)
- .with_state(bulk_copy_in_progress: true)
+ .with_state(bulk_duplicate_in_progress: true)
.call(**overridden_attributes.symbolize_keys)
end
end
diff --git a/app/services/work_packages/create_service.rb b/app/services/work_packages/create_service.rb
index 40dc7080e6a..7b729abd453 100644
--- a/app/services/work_packages/create_service.rb
+++ b/app/services/work_packages/create_service.rb
@@ -89,7 +89,7 @@ class WorkPackages::CreateService < BaseServices::BaseCallable
def reschedule_related(work_package)
# Force work package to keep its scheduling mode if it's automatic.
- # This is necessary in bulk copy scenarios.
+ # This is necessary in bulk duplicate scenarios.
switching_to_automatic_mode = []
switching_to_automatic_mode << work_package if work_package.schedule_automatically?
result = WorkPackages::SetScheduleService.new(user:, work_package:, switching_to_automatic_mode:).call
diff --git a/app/services/work_packages/update_ancestors_service.rb b/app/services/work_packages/update_ancestors_service.rb
index 5c1769d8a85..cfd5a48f090 100644
--- a/app/services/work_packages/update_ancestors_service.rb
+++ b/app/services/work_packages/update_ancestors_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
@@ -172,8 +174,8 @@ class WorkPackages::UpdateAncestorsService < BaseServices::BaseCallable
return if initiator_work_package.parent_id.nil?
return if initiator_work_package.parent_id != work_package.id
- # it only applies if there is no bulk copy in progress: if it's a copy, the copy must stay exact
- return if state.bulk_copy_in_progress
+ # it only applies if there is no bulk duplicate in progress: if it's a copy, the copy must stay exact
+ return if state.bulk_duplicate_in_progress
# it only applies if the parent is manually scheduled
return if work_package.schedule_automatically?
diff --git a/app/views/work_packages/moves/new.html.erb b/app/views/work_packages/moves/new.html.erb
index de989b5a6a4..b473bda16ad 100644
--- a/app/views/work_packages/moves/new.html.erb
+++ b/app/views/work_packages/moves/new.html.erb
@@ -27,9 +27,9 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
-<% html_title @copy ? t(:button_copy) : t(:button_move), t("activerecord.models.work_package") %>
+<% html_title @copy ? t(:button_duplicate) : t(:button_move), t("activerecord.models.work_package") %>
-<h2><%= @copy ? t(:button_copy) : t(:button_move) %></h2>
+<h2><%= @copy ? t(:button_duplicate) : t(:button_move) %></h2>
<ul>
<% @work_packages.each do |work_package| -%>
<li>
@@ -210,8 +210,8 @@ See COPYRIGHT and LICENSE files for more details.
</section>
<% if @copy %>
<%= hidden_field_tag("copy") %>
- <%= styled_submit_tag t(:button_copy), class: "-primary" %>
- <%= styled_submit_tag t(:button_copy_and_follow), name: "follow", class: "-primary" %>
+ <%= styled_submit_tag t(:button_duplicate), class: "-primary" %>
+ <%= styled_submit_tag t(:button_duplicate_and_follow), name: "follow", class: "-primary" %>
<% else %>
<%= styled_submit_tag t(:button_move), class: "-primary" %>
<%= styled_submit_tag t(:button_move_and_follow), name: "follow", class: "-primary" %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 16a18d811d3..9597249723a 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1951,7 +1951,6 @@ en:
button_copy: "Copy"
button_copy_to_clipboard: "Copy to clipboard"
button_copy_link_to_clipboard: "Copy link to clipboard"
- button_copy_and_follow: "Copy and follow"
button_create: "Create"
button_create_and_continue: "Create and continue"
button_decline: "Decline"
@@ -1960,6 +1959,7 @@ en:
button_delete_watcher: "Delete watcher %{name}"
button_download: "Download"
button_duplicate: "Duplicate"
+ button_duplicate_and_follow: "Duplicate and follow"
button_edit: "Edit"
button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}"
button_expand_all: "Expand all"
@@ -3685,7 +3685,7 @@ en:
permission_comment_news: "Comment news"
permission_commit_access: "Read/write access to repository (commit)"
permission_copy_projects: "Copy projects"
- permission_copy_work_packages: "Copy work packages"
+ permission_copy_work_packages: "Duplicate work packages"
permission_create_backup: "Create backups"
permission_delete_work_package_watchers: "Delete watchers"
permission_delete_work_packages: "Delete work packages"
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index f3573f5cc64..e78d4970bb4 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -904,10 +904,10 @@ en:
mixed: "Mixed"
work_packages:
bulk_actions:
- move: "Bulk change of project"
edit: "Bulk edit"
- copy: "Bulk copy"
delete: "Bulk delete"
+ duplicate: "Bulk duplicate"
+ move: "Bulk change of project"
button_clear: "Clear"
comment_added: "The comment was successfully added."
comment_send_failed: "An error has occurred. Could not submit the comment."
@@ -951,8 +951,8 @@ en:
header_no_type: "New work package (Type not yet set)"
header_with_parent: "New %{type} (Child of %{parent_type} #%{id})"
button: "Create"
- copy:
- title: "Copy work package"
+ duplicate:
+ title: "Duplicate work package"
hierarchy:
show: "Show hierarchy mode"
hide: "Hide hierarchy mode"
diff --git a/docs/user-guide/work-packages/edit-work-package/README.md b/docs/user-guide/work-packages/edit-work-package/README.md
index edbfb979e10..73098c06f47 100644
--- a/docs/user-guide/work-packages/edit-work-package/README.md
+++ b/docs/user-guide/work-packages/edit-work-package/README.md
@@ -23,7 +23,7 @@ keywords: edit work packages, reminders, work package reminders, attachment, int
To edit a work package, double-click a work package row in [table view](../../work-packages/work-package-views/#table-view) or open the [split screen view](../../work-packages/work-package-views/#split-screen-view) to see the details.
-In the work package details, you can click in any field to update it, e.g. change the description, status, priority, assignee, or add a comment.
+In the work package details, you can click in any field to update it, e.g. change the description, status, priority, assignee, or add a comment.
> [!TIP]
> You can also insert a page break into the description field if you intend to [export a work package in PDF format](../exporting/#pdf-report) and want to the description to be displayed on separate pages of a PDF report.
@@ -67,7 +67,7 @@ Please note, the status may differ from work package type. They can be configure
To add a comment to a work package, open the [details view](../../work-packages/work-package-views/#full-screen-view) or the [split screen view](../../work-packages/work-package-views/#split-screen-view) of a work package. Under [Activity](../../../getting-started/work-packages-introduction/#activity-of-work-packages) tab you have a comment field at the bottom.
-> [!TIP]
+> [!TIP]
>
> For narrower screens such as mobiles and tablets, the comment field may be displayed on the top, depending on your [Account settings](../../../user-guide/account-settings/).
@@ -91,7 +91,7 @@ To edit a work package comment click the **More (three dots)** icon at the right
#### Copy a work package comment link
-You can copy a direct link to a specific work package comment in OpenProject. To do that, click the **More (three dots)** icon at the right side of the comment and select **Copy link to clipboard**.
+You can copy a direct link to a specific work package comment in OpenProject. To do that, click the **More (three dots)** icon at the right side of the comment and select **Copy link to clipboard**.
![Copy a link to a work package comment in OpenProject](openproject_user_guide_wp_edit_comment_copy_link.png)
@@ -100,9 +100,9 @@ You can copy a direct link to a specific work package comment in OpenProject. To
> [!NOTE]
> Internal comments are an Enterprise add-on and can only be used with [Enterprise cloud](../../../enterprise-guide/enterprise-cloud-guide/) or [Enterprise on-premises](../../../enterprise-guide/enterprise-on-premises-guide/). An upgrade from the free Community edition is easily possible.
-It is possible to add comments that are only visible to a select group of people. These are referred to as internal comments.
+It is possible to add comments that are only visible to a select group of people. These are referred to as internal comments.
-Please refer to [this part of the user guide](../../activity/#internal-comments-enterprise-add-on) for more details.
+Please refer to [this part of the user guide](../../activity/#internal-comments-enterprise-add-on) for more details.
### @ notification (mention)
@@ -128,7 +128,7 @@ You can manually upload files to work packages directly under the *Files* tab in
Under the *Files* tab you will see the list of the all previously uploaded attachments, including file names, as well as which user uploaded an attachment and when. If no files were attached yet, the list will be empty.
-Attachments include files or images added to work package descriptions.
+Attachments include files or images added to work package descriptions.
You can remove an attachment by hovering over it and clicking the **Delete** icon.
@@ -136,7 +136,7 @@ You can remove an attachment by hovering over it and clicking the **Delete** ico
> [!TIP]
>
-> Attachments within work package comments (e.g. screenshots) will not be displayed under Files tab.
+> Attachments within work package comments (e.g. screenshots) will not be displayed under Files tab.
## Work package reminders
@@ -144,7 +144,7 @@ If you want to be reminded about a work package at a later point in time, you ca
![Work package reminder icon in OpenProject](openproject_user_guide_wp_reminder_icon.png)
-A list with helpful pre-defined options will open, from which you can select:
+A list with helpful pre-defined options will open, from which you can select:
- tomorrow
- in 3 days
@@ -157,7 +157,7 @@ Selecting any of these options will display a modal. The time will be set to 9 a
> [!TIP]
> All the pre-defined reminder options will be set to 9 am of the selected date.
-![Pre-defined options for a work package reminder in OpenProject](openproject_user_guide_wp_reminder_quick_options.png)
+![Pre-defined options for a work package reminder in OpenProject](openproject_user_guide_wp_reminder_quick_options.png)
Specify the time and date on which you would like to be reminded and optionally add a note for more context. Then click the **Set reminder** button.
@@ -167,12 +167,12 @@ Once you set a reminder, you will see a confirmation message. The reminder icon
![A badge to indicate a set reminder in OpenProject work package](openproject_user_guide_wp_reminder_badge.png)
-At the configured date and time, you will receive the reminder in [Notification center](../../notifications/#access-in-app-notifications).
+At the configured date and time, you will receive the reminder in [Notification center](../../notifications/#access-in-app-notifications).
![Work package reminder in OpenProject notification center](openproject_user_guide_wp_set_reminder_notification.png)
-> [!NOTE]
-> If multiple notifications exist for a single work package, the reminder will take precedence, showing the reminder note at the bottom of the page.
+> [!NOTE]
+> If multiple notifications exist for a single work package, the reminder will take precedence, showing the reminder note at the bottom of the page.
> In case a work package has both a reminder and date alert notification set up, then the date alert is combined with the reminder note, so that both are visible.
> [!TIP]
@@ -221,7 +221,7 @@ Then you have the possibility to:
* Open the fullscreen view of all selected work packages.
* Bulk edit all selected work packages.
* Bulk change of the project of all selected work packages.
-* Bulk copy all selected work packages, incl. the hierarchy relations (parent-child relations).
+* Bulk duplicate all selected work packages, incl. the hierarchy relations (parent-child relations).
* Bulk delete all selected work packages.
![Bulk edit work packages in OpenProject](openproject_user_guide_wp_bulk_edit.png)
@@ -232,7 +232,7 @@ At the bottom of the page you can decide whether notifications about these chang
## Update a work package in a work package table view
-In the work package table view, you can not only open a single work package but also trigger direct actions such as logging time and costs, copying, downloading or deleting said work package. To access the quick context menu, simply right-click any work package in a work package table view and select the preferred action.
+In the work package table view, you can not only open a single work package but also trigger direct actions such as logging time and costs, duplicating, downloading or deleting said work package. To access the quick context menu, simply right-click any work package in a work package table view and select the preferred action.
![Quick context menu in OpenProject work package table](openproject_user_guide_wp_quick_context_menu.png)
@@ -243,14 +243,14 @@ You have the following options:
- **Copy link to clipboard** - copies a short link to the selected work package to your clipboard.
- **Log time** - opens a pop-up dialogue allowing you to [log time](../../time-and-costs/time-tracking/#log-time-in-the-work-package-view) directly to a work package without having to open it first.
- **Log unit costs** - navigates you to the cost logging screen. Once you [log the costs](../../time-and-costs/cost-tracking/) and save the entry, you will return to the work package table view.
-- **Move to another project** - allows moving the selected work package to a different project.
+- **Move to another project** - allows moving the selected work package to a different project.
- **Duplicate** - opens a details view of a new work package on the right side of the screen. This new work package is an exact copy of the work package you selected, but you can adjust any details you would like to change and then save it.
- **Duplicate in another project** - allows duplicating the selected work package to a different project.
- **Delete** - deletes a work package. You will need to confirm the deletion.
- **Download PDF** - downloads the selected work package as a PDF file.
- **Download Atom** - downloads the selected work package as an Atom file.
- **Indent hierarchy** - creates a child-parent relationship with the work package directly above. The work package you selected become the child work package. The work package directly above becomes the parent work package.
-- **Create new child** - opens a new work package on the right side of the screen. This new work package already has a child relationship to the work package you selected.
+- **Create new child** - opens a new work package on the right side of the screen. This new work package already has a child relationship to the work package you selected.
> [!TIP]
> In OpenProject 14.5 the term *Copy a work package* was replaced by *Duplicate a work package*. *Change project* was replaced by *Move to another project*.
diff --git a/docs/user-guide/work-packages/work-packages-faq/README.md b/docs/user-guide/work-packages/work-packages-faq/README.md
index d278a9a0c58..8c4c0588743 100644
--- a/docs/user-guide/work-packages/work-packages-faq/README.md
+++ b/docs/user-guide/work-packages/work-packages-faq/README.md
@@ -178,17 +178,17 @@ To highlight and edit several work packages at once, keep the Ctrl key pressed a
**Right-click** on the highlighted work packages. This will open a context menu.
-Select **Bulk copy** in order to copy all selected work packages including their relations.
+Select **Bulk duplicate** in order to copy all selected work packages including their relations.
![image-20200331132513748](image-20200331132513748.png)
-In the following view you have the possibility to change additional attributes of the work packages to be copied. Confirm your selection with **Copy**.
+In the following view you have the possibility to change additional attributes of the work packages to be copied. Confirm your selection with **Duplicate**.
### How can I move a work package to another project?
-In the work package table: Right-click on the work package and choose **Move to another project**.
+In the work package table: Right-click on the work package and choose **Move to another project**.
-In the details view of the work package: Click on **More** (button with three dots in the upper right hand corner) and then on **Move to another project**.
+In the details view of the work package: Click on **More** (button with three dots in the upper right hand corner) and then on **Move to another project**.
> [!TIP]
> If a work package you move has children work packages, they will be moved to the selected project as well.
diff --git a/frontend/src/app/core/path-helper/path-helper.service.ts b/frontend/src/app/core/path-helper/path-helper.service.ts
index e9992e4adf5..f4f2006fcdc 100644
--- a/frontend/src/app/core/path-helper/path-helper.service.ts
+++ b/frontend/src/app/core/path-helper/path-helper.service.ts
@@ -344,7 +344,7 @@ export class PathHelperService {
return `${this.workPackagesPath(null)}/move/new`;
}
- public workPackagesBulkCopyPath() {
+ public workPackagesBulkDuplicatePath() {
return `${this.workPackagesBulkMovePath()}?copy=true`;
}
diff --git a/frontend/src/app/features/work-packages/components/wp-copy/wp-copy.controller.ts b/frontend/src/app/features/work-packages/components/wp-copy/wp-copy.controller.ts
index 3d26acab963..2c5f9e957b1 100644
--- a/frontend/src/app/features/work-packages/components/wp-copy/wp-copy.controller.ts
+++ b/frontend/src/app/features/work-packages/components/wp-copy/wp-copy.controller.ts
@@ -81,7 +81,7 @@ export class WorkPackageCopyController extends WorkPackageCreateComponent {
}
protected setTitle() {
- this.titleService.setFirstPart(this.I18n.t('js.work_packages.copy.title'));
+ this.titleService.setFirstPart(this.I18n.t('js.work_packages.duplicate.title'));
}
private createCopyFrom(wp:WorkPackageResource) {
diff --git a/frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts b/frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts
index 4874f3369c0..f8509ee7351 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts
+++ b/frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts
@@ -60,10 +60,10 @@ export class WorkPackageContextMenuHelperService {
href: this.PathHelper.workPackagesBulkMovePath(),
},
{
- text: I18n.t('js.work_packages.bulk_actions.copy'),
+ text: I18n.t('js.work_packages.bulk_actions.duplicate'),
key: 'copy',
link: 'copy',
- href: this.PathHelper.workPackagesBulkCopyPath(),
+ href: this.PathHelper.workPackagesBulkDuplicatePath(),
},
{
text: I18n.t('js.work_packages.bulk_actions.delete'),
diff --git a/modules/bim/spec/features/card_view/bulk_actions_spec.rb b/modules/bim/spec/features/card_view/bulk_actions_spec.rb
index f8dddb0df34..6e300c6bf2b 100644
--- a/modules/bim/spec/features/card_view/bulk_actions_spec.rb
+++ b/modules/bim/spec/features/card_view/bulk_actions_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "spec_helper"
require_relative "../../support/pages/ifc_models/show_default"
@@ -45,13 +47,13 @@ RSpec.describe "Copy work packages through Rails view", :js, with_config: { edit
find("body").send_keys [:control, "a"]
end
- describe "accessing the bulk copy from the card view" do
+ describe "accessing the bulk duplicate from the card view" do
context "with permissions" do
let(:current_user) { mover }
it "does allow to copy" do
context_menu.open_for work_package, card_view: true
- context_menu.expect_options "Bulk copy"
+ context_menu.expect_options "Bulk duplicate"
end
end
diff --git a/spec/controllers/work_packages/moves_controller_spec.rb b/spec/controllers/work_packages/moves_controller_spec.rb
index 177eb7c6552..9b2c9afc7bf 100644
--- a/spec/controllers/work_packages/moves_controller_spec.rb
+++ b/spec/controllers/work_packages/moves_controller_spec.rb
@@ -69,8 +69,8 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
describe "new.html" do
become_admin
- describe "w/o a valid planning element id" do
- describe "w/o being a member or administrator" do
+ describe "without a valid planning element id" do
+ describe "without being a member or administrator" do
become_non_member
it "renders a 404 page" do
@@ -80,7 +80,7 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
end
end
- describe "w/ the current user being a member" do
+ describe "with the current user being a member" do
become_member_with_view_planning_element_permissions
it "raises ActiveRecord::RecordNotFound errors" do
@@ -91,10 +91,10 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
end
end
- describe "w/ a valid planning element id" do
+ describe "with a valid planning element id" do
become_admin
- describe "w/o being a member or administrator" do
+ describe "without being a member or administrator" do
become_non_member
it "renders a 403 Forbidden page" do
@@ -104,7 +104,7 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
end
end
- describe "w/ the current user being a member" do
+ describe "with the current user being a member" do
become_member_with_move_work_package_permissions
before do
@@ -130,7 +130,7 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
end
describe "an issue to another project" do
- context "w/o following" do
+ context "without following" do
before do
status
end
@@ -273,7 +273,7 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
describe "move with given note" do
let(:note) { "Moving a work package" }
- context "w/o work package changes" do
+ context "without work package changes" do
before do
post :create,
params: {
@@ -287,7 +287,7 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
end
end
- context "w/o work package changes" do
+ context "with a work package priority change" do
before do
post :create,
params: {
@@ -303,8 +303,8 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
end
end
- describe "&copy" do
- context "follows to another project" do
+ describe "& duplicate" do
+ context "when following to another project" do
before do
post :create,
params: {
@@ -322,7 +322,7 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
end
end
- context "w/o changing the work package's attribute" do
+ context "without changing the work package's attribute" do
before do
post :create,
params: {
@@ -342,7 +342,7 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
expect(subject.status_id).to eq(work_package.status_id)
end
- it "did not change the status" do
+ it "did not change the version" do
expect(subject.version_id).to eq(work_package.version_id)
end
@@ -356,8 +356,8 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
end
context "with changing the work package's attribute" do
- let(:start_date) { Date.today }
- let(:due_date) { Date.today + 1 }
+ let(:start_date) { Date.current }
+ let(:due_date) { Date.tomorrow }
let(:target_version) { create(:version, project: target_project) }
let(:target_type) { target_project.types.first }
let(:target_status) { create(:status, workflow_for_type: target_type) }
@@ -391,7 +391,7 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
subject { WorkPackage.limit(2).order(Arel.sql("id desc")).where(project_id: target_project.id) }
- it "copied two work packages" do
+ it "duplicates two work packages" do
expect(subject.count).to eq(2)
end
@@ -439,7 +439,7 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
end
context "with given note" do
- let(:note) { "Copying a work package" }
+ let(:note) { "Duplicating a work package" }
before do
post :create,
@@ -488,9 +488,9 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
end
end
- context "when copying the parent with a child exceeds the request limit",
+ context "when duplicating the parent with a child exceeds the request limit",
with_settings: { work_packages_bulk_request_limit: 1 } do
- let(:note) { "Copying a work package" }
+ let(:note) { "Duplicating a work package" }
before do
post :create,
@@ -517,7 +517,7 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregati
end
end
- context "when copying child work package from one project to other" do
+ context "when duplicating child work package from one project to other" do
let(:to_project) do
create(:project,
types: [type])
diff --git a/spec/features/work_packages/bulk/copy_work_package_spec.rb b/spec/features/work_packages/bulk/copy_work_package_spec.rb
index 19ba17f9ca4..16f4ebd2ec9 100644
--- a/spec/features/work_packages/bulk/copy_work_package_spec.rb
+++ b/spec/features/work_packages/bulk/copy_work_package_spec.rb
@@ -4,7 +4,7 @@ require "spec_helper"
require "features/page_objects/notification"
require "support/components/autocompleter/ng_select_autocomplete_helpers"
-RSpec.describe "Copy work packages through Rails view", :js do
+RSpec.describe "Duplicate work packages through Rails view", :js do
include Components::Autocompleter::NgSelectAutocompleteHelpers
shared_let(:type) { create(:type, name: "Bug") }
@@ -70,7 +70,7 @@ RSpec.describe "Copy work packages through Rails view", :js do
before do
context_menu.open_for work_package
- context_menu.choose "Bulk copy"
+ context_menu.choose "Bulk duplicate"
expect(page).to have_css("#new_project_id") # rubocop:disable RSpec/ExpectInHook
@@ -85,10 +85,10 @@ RSpec.describe "Copy work packages through Rails view", :js do
wait_for_network_idle # wait for the change of target project to finish updating the page
end
- it "sets the version on copy and leaves a note" do
+ it "sets the version on duplicate and leaves a note" do
select version.name, from: "version_id"
- notes.set_markdown "A note on copy"
- click_on "Copy and follow"
+ notes.set_markdown "A note on duplicate"
+ click_on "Duplicate and follow"
wp_table_target.expect_current_path
wp_table_target.expect_work_package_count 2
@@ -102,15 +102,15 @@ RSpec.describe "Copy work packages through Rails view", :js do
copied_wps = WorkPackage.last(2)
expect(copied_wps.map(&:project_id).uniq).to eq([project2.id])
expect(copied_wps.map(&:version_id).uniq).to eq([version.id])
- expect(copied_wps.map { |wp| wp.journals.last.notes }.uniq).to eq(["A note on copy"])
+ expect(copied_wps.map { |wp| wp.journals.last.notes }.uniq).to eq(["A note on duplicate"])
end
context "when the limit to move in the frontend is reached",
with_settings: { work_packages_bulk_request_limit: 1 } do
it "copies them in the background and shows a status page" do
select version.name, from: "version_id"
- notes.set_markdown "A note on copy"
- click_on "Copy and follow"
+ notes.set_markdown "A note on duplicate"
+ click_on "Duplicate and follow"
expect(page).to have_text("The job has been queued and will be processed shortly.", wait: 10)
@@ -171,7 +171,7 @@ RSpec.describe "Copy work packages through Rails view", :js do
it "copies WPs with parent/child hierarchy and relations maintained, " \
"as well as dates and scheduling modes" do
- click_on "Copy and follow"
+ click_on "Duplicate and follow"
wp_table_target.expect_current_path
expect(page).to have_css("#projects-menu", text: "Target")
@@ -240,7 +240,7 @@ RSpec.describe "Copy work packages through Rails view", :js do
it "copies WPs with relations maintained, " \
"as well as dates and scheduling modes" do
- click_on "Copy and follow"
+ click_on "Duplicate and follow"
wp_table_target.expect_current_path
expect(page).to have_css("#projects-menu", text: "Target")
@@ -278,7 +278,7 @@ RSpec.describe "Copy work packages through Rails view", :js do
end
it "fails, informing of the reasons" do
- click_on "Copy and follow"
+ click_on "Duplicate and follow"
expect_flash(type: :error, message: I18n.t("work_packages.bulk.none_could_be_saved", total: 3))
expect_flash(type: :error,
@@ -296,7 +296,7 @@ RSpec.describe "Copy work packages through Rails view", :js do
context "when the limit to move in the frontend is 0",
with_settings: { work_packages_bulk_request_limit: 0 } do
it "shows the errors properly in the frontend" do
- click_on "Copy and follow"
+ click_on "Duplicate and follow"
expect(page).to have_text "The job has been queued and will be processed shortly."
@@ -325,7 +325,7 @@ RSpec.describe "Copy work packages through Rails view", :js do
context "without permission" do
let(:current_user) { dev }
- it "does not allow to copy" do
+ it "does not allow to duplicate work packages" do
context_menu.open_for work_package, check_if_open: false
context_menu.expect_closed
end
@@ -342,7 +342,7 @@ RSpec.describe "Copy work packages through Rails view", :js do
work_package.save
end
- it "copies the work package" do
+ it "duplicates the work package" do
context_menu.open_for work_package
context_menu.choose "Duplicate in another project"
@@ -357,7 +357,7 @@ RSpec.describe "Copy work packages through Rails view", :js do
select "nobody", from: "Assignee"
- click_on "Copy and follow"
+ click_on "Duplicate and follow"
expect_flash(message: I18n.t(:notice_successful_create))
diff --git a/spec/features/work_packages/details/context_menu_spec.rb b/spec/features/work_packages/details/context_menu_spec.rb
index 3baa0982a00..c0ecee9a63e 100644
--- a/spec/features/work_packages/details/context_menu_spec.rb
+++ b/spec/features/work_packages/details/context_menu_spec.rb
@@ -14,9 +14,9 @@ RSpec.describe "Work package single context menu", :js, :selenium do
find("#action-show-more-dropdown-menu .button").click
end
- it "sets the correct copy project link" do
+ it "sets the correct duplicate work package link" do
find(".menu-item", text: "Duplicate in another project", exact_text: true).click
- expect(page).to have_css("h2", text: I18n.t(:button_copy))
+ expect(page).to have_css("h2", text: I18n.t(:button_duplicate))
expect(page).to have_css("a.work_package", text: "##{work_package.id}")
expect(page).to have_current_path /work_packages\/move\/new\?copy=true&ids\[\]=#{work_package.id}/
end
diff --git a/spec/features/work_packages/project_phases/copying_spec.rb b/spec/features/work_packages/project_phases/copying_spec.rb
index 5a4dcf3ac42..2a7c9267d99 100644
--- a/spec/features/work_packages/project_phases/copying_spec.rb
+++ b/spec/features/work_packages/project_phases/copying_spec.rb
@@ -84,7 +84,7 @@ RSpec.describe "Copying a work package with linked project phases", :js do
wait_for_network_idle
- click_on "Copy and follow"
+ click_on "Duplicate and follow"
# Not actually the same work package page any more but works just the same.
work_package_page.expect_and_dismiss_flash(message: "Successful creation.")
@@ -110,7 +110,7 @@ RSpec.describe "Copying a work package with linked project phases", :js do
wait_for_network_idle
- click_on "Copy and follow"
+ click_on "Duplicate and follow"
# Not actually the same work package page any more but works just the same.
work_package_page.expect_and_dismiss_flash(message: "Successful creation.")
diff --git a/spec/features/work_packages/table/context_menu/context_menu_shared_examples.rb b/spec/features/work_packages/table/context_menu/context_menu_shared_examples.rb
index e6274467b42..5dcbc4d33fc 100644
--- a/spec/features/work_packages/table/context_menu/context_menu_shared_examples.rb
+++ b/spec/features/work_packages/table/context_menu/context_menu_shared_examples.rb
@@ -37,10 +37,10 @@ RSpec.shared_examples_for "provides a single WP context menu" do
expect(page).to have_css("h2", text: I18n.t(:button_move))
expect(page).to have_css("a.work_package", text: "##{work_package.id}")
- # Open Copy
+ # Open Duplicate
open_context_menu.call
menu.choose("Duplicate")
- # Split view open in copy state
+ # Split view open in duplicate state
expect(page)
.to have_css(".wp-new-top-row",
text: "#{work_package.status.name.capitalize}\n#{work_package.type.name.upcase}")
@@ -70,7 +70,7 @@ RSpec.shared_examples_for "provides a single WP context menu" do
# Duplicate in another project
open_context_menu.call
menu.choose("Duplicate in another project")
- expect(page).to have_css("h2", text: I18n.t(:button_copy))
+ expect(page).to have_css("h2", text: I18n.t(:button_duplicate))
expect(page).to have_css("a.work_package", text: "##{work_package.id}")
end
diff --git a/spec/features/work_packages/table/context_menu/context_menu_spec.rb b/spec/features/work_packages/table/context_menu/context_menu_spec.rb
index 2489289e8fc..9ecf33f2f13 100644
--- a/spec/features/work_packages/table/context_menu/context_menu_spec.rb
+++ b/spec/features/work_packages/table/context_menu/context_menu_spec.rb
@@ -59,7 +59,7 @@ RSpec.describe "Work package table context menu",
find("body").send_keys [:control, "a"]
menu.open_for(work_package)
- menu.expect_options "Bulk edit", "Bulk copy", "Bulk change of project", "Bulk delete"
+ menu.expect_options "Bulk edit", "Bulk duplicate", "Bulk change of project", "Bulk delete"
end
end
end
diff --git a/spec/services/work_packages/update_ancestors_service_spec.rb b/spec/services/work_packages/update_ancestors_service_spec.rb
index 31bb7bfa831..1daa79cbffc 100644
--- a/spec/services/work_packages/update_ancestors_service_spec.rb
+++ b/spec/services/work_packages/update_ancestors_service_spec.rb
@@ -1173,20 +1173,20 @@ RSpec.describe WorkPackages::UpdateAncestorsService,
end
context "when a manually scheduled work package becomes parent for the first time, " \
- "but it's part of a bulk copy in progress" do
+ "but it's part of a bulk duplicate in progress" do
let_work_packages(<<~TABLE)
subject | scheduling mode
future parent | manual
future child | manual
TABLE
let(:initiator_work_package) { future_child }
- let(:state) { { bulk_copy_in_progress: true } }
+ let(:state) { { bulk_duplicate_in_progress: true } }
before do
future_child.update!(parent: future_parent)
end
- it "keeps the scheduling mode (or it would not be an exact copy anymore)" do
+ it "keeps the scheduling mode (or it would not be an exact duplicate anymore)" do
expect(call_result).to be_success
expect(future_parent.reload.schedule_manually).to be(true)
end