プロジェクト

全般

プロフィール

Vote #78907

完了

Switching SCM fails after validation error in "New repository" page

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
SCM_3
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
3
version_id:
136
issue_org_id:
27333
author_id:
259873
assigned_to_id:
332
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Steps to reproduce:

Open “New repository” ( /projects/:project_name/repositories/new )

Click the Create button without making any changes.

Change SCM (e.g. "Subversion" to "Git")

==> The input form does not change at all. As below.

|Incorrect form for 'Git'|Correct form for 'Git'|
|!incorrect_git.png!|!correct_git.png!|

development.log:
There is an error "ActionController::RoutingError (No route matches [GET] "/projects/:project_name/repositories"):".

You can solve the problem by making the following changes.


diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb
index 314c0b29b..435041b72 100644
--- a/app/helpers/repositories_helper.rb
+++ b/app/helpers/repositories_helper.rb
@@ -138,7 +138,7 @@ module RepositoriesHelper
     select_tag('repository_scm',
                options_for_select(scm_options, repository.class.name.demodulize),
                :disabled => (repository && !repository.new_record?),
-               :data => {:remote => true, :method => 'get'})
+               :data => {:remote => true, :method => 'get', :url => new_project_repository_path(repository.project)})
   end
 
   def with_leading_slash(path)

journals

LGTM.
--------------------------------------------------------------------------------
Redmine 3.3 also is affected by this issue and the patch can be applied to 3.3-stable cleanly. Setting target version to 3.3.6.
--------------------------------------------------------------------------------
Committed. Thank you for detecting and fixing this issue.
--------------------------------------------------------------------------------
Merged to stable branches.
--------------------------------------------------------------------------------

Admin Redmine さんが4年以上前に更新

  • カテゴリSCM_3 にセット
  • 対象バージョン3.3.6_136 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0