[#74323] Replace user number with relevant information during project(s) migration

https://community.openproject.org/wp/74323

- Remove Jira Migrator feature flag.
This commit is contained in:
Pavel Balashou
2026-04-23 12:21:34 +02:00
parent fc404307db
commit 3f17e1c0db
8 changed files with 15 additions and 19 deletions
@@ -38,9 +38,10 @@ module Admin::Import::Jira::ImportRuns
projects_label(selected_projects_count),
issues_label(selected_issues_count),
statuses_label(selected_statuses_count),
types_label(selected_types_count),
users_label(available_users_count)
].map { |label| { label:, checked: true } }
types_label(selected_types_count)
]
.map { |label| { label:, checked: true } }
.push({ label: I18n.t(:"admin.jira.run.wizard.sections.confirm_import.label_users_import_explanation") })
end
def selected_projects_count
@@ -58,9 +59,5 @@ module Admin::Import::Jira::ImportRuns
def selected_statuses_count
model.selected["status_ids"]&.count || 0
end
def available_users_count
model.available["total_users"]
end
end
end
+2
View File
@@ -32,6 +32,8 @@ module Import
class Jira < ApplicationRecord
self.table_name = "jiras"
has_many :jira_imports, dependent: :destroy
validate :url_must_be_http_or_https
def client
-4
View File
@@ -57,10 +57,6 @@ OpenProject::FeatureDecisions.add :portfolio_models,
description: "Enables the creation and management of portfolio and program work spaces.",
force_active: true
OpenProject::FeatureDecisions.add :jira_import,
description: "Enables Jira Migration Tool.",
force_active: false
OpenProject::FeatureDecisions.add :user_working_times,
description: "Enables tracking of user working hours and non-working days."
+2 -2
View File
@@ -679,13 +679,13 @@ Redmine::MenuManager.map :admin_menu do |menu|
menu.push :import,
{ controller: "/admin/import/jira/instances", action: :index },
if: ->(_) { User.current.admin? && OpenProject::FeatureDecisions.jira_import_active? },
if: ->(_) { User.current.admin? },
caption: :label_import,
icon: "desktop-download"
menu.push :jira_import,
{ controller: "/admin/import/jira/instances", action: :index },
if: ->(_) { User.current.admin? && OpenProject::FeatureDecisions.jira_import_active? },
if: ->(_) { User.current.admin? },
caption: :label_jira_import,
parent: :import
end
+1
View File
@@ -269,6 +269,7 @@ en:
caption: "Review your import settings and start the import"
caption_done: "Completed"
label_available_data: "Available data to import"
label_users_import_explanation: "Users that are involved in selected projects (group memberships included)"
button_start: "Start import"
description: "You are about to start an import run with the following settings."
label_progress: "Import in progress..."
+1 -1
View File
@@ -743,7 +743,7 @@ Rails.application.routes.draw do
post "plugin/:id", action: :update_plugin
end
namespace :import, constraints: lambda { |_request| OpenProject::FeatureDecisions.jira_import_active? } do
namespace :import do
get "/", to: redirect("/admin/import/jira")
resources :jira, controller: "/admin/import/jira/instances" do
collection do
@@ -30,7 +30,7 @@
require "spec_helper"
RSpec.describe "Jira instance configuration", :js, with_flag: { jira_import: true } do
RSpec.describe "Jira instance configuration", :js do
shared_let(:admin) { create(:admin) }
current_user { admin }
@@ -46,8 +46,8 @@ RSpec.describe "Admin menu items",
context "without having any menu items hidden in configuration" do
it "must display all menu items" do
expect(page).to have_test_selector("menu-blocks--container")
expect(page).to have_test_selector("menu-block", count: 23)
expect(page).to have_test_selector("op-menu--item-action", count: 24) # All plus 'overview'
expect(page).to have_test_selector("menu-block", count: 24)
expect(page).to have_test_selector("op-menu--item-action", count: 25) # All plus 'overview'
end
end
@@ -57,10 +57,10 @@ RSpec.describe "Admin menu items",
} do
it "must not display the hidden menu items and blocks" do
expect(page).to have_test_selector("menu-blocks--container")
expect(page).to have_test_selector("menu-block", count: 22)
expect(page).to have_test_selector("menu-block", count: 23)
expect(page).not_to have_test_selector("menu-block", text: I18n.t(:label_color_plural))
expect(page).to have_test_selector("op-menu--item-action", count: 23) # All plus 'overview'
expect(page).to have_test_selector("op-menu--item-action", count: 24) # All plus 'overview'
expect(page).not_to have_test_selector("op-menu--item-action", text: I18n.t(:label_color_plural))
end
end