プロジェクト

全般

プロフィール

Vote #73895

完了

Can't delete relation when Redmine runs in a subpath

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

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

0%

予定工数:
category_id:
2
version_id:
72
issue_org_id:
14023
author_id:
61511
assigned_to_id:
1
comments:
6
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
60
ステータス-->[Closed]

説明

+Brief Description:+

  • Since update to V2.3.0, it's not possible to delete a related issue.
  • this worked very well in former versions

+Reproduce Hints:+

open a Ticket view, go down to 'Related issues' and [Add] an issue

select 'Related to', type another valid ticket no. of same project and [Add] => everything ok!

Now try to [Delete Relation] of that issue in same view

Dialog 'Are you sure?', press [Ok] => relation is still active!

+Notes:+

  • We tryed a lot, but did not find a workaround for that bug.
  • The bug exists in V2.3.1 too.
  • 'Related Issues' is a powerful feature in Redmine. So we hope, that somebody improves the priority of this defect for next release V2.3.2.

journals

This seems to be a problem triggered by running redmine in a subpath. To make redmine run in the subpath "/redmine", two things were done:

# The line @Redmine::Utils::relative_url_root = "/redmine"@ was added as last line of @config/environment.rb@
# The workaround described "here":http://www.redmine.org/boards/2/topics/30676?r=30881#message-30881 was used.

This adds the prefix "/redmine" to all links, but it misses the "Remove relation" link. However, even after adding the prefix, redmine can't route the DELETE-request: ActionController::RoutingError (No route matches [DELETE] "/redmine/relations/123456").

Hope this helps in fixing it.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
This may be considered as resolved.

The problem was that routes to relations are shallow routes and the variable @:shallow_path@ was not set accordingly. It would be nice if redmine would work in subdirectories again. Using a reverse proxy sadly is no option, because some paths are hardcoded into JS, which makes them hard to adjust.

I've posted an attempt of a solution "here":http://www.redmine.org/boards/2/topics/30676?r=37825#message-37825, but that is probably not the best way of resolving the issue.
--------------------------------------------------------------------------------
According to http://stackoverflow.com/questions/6422677/rails-routes-with-scope-locale-and-shallow-nested-resources, you should be able to specify :shallow_path only once with your scope (not tested):

<pre><code class="ruby">
scope :path => "redmine", :shallow_path => "redmine" do
...
end
</code></pre>

IIRC, there was no need to change the routes with Rails 2 for running in a suburi.
--------------------------------------------------------------------------------
While using @:shallow => true@ ignores the scope, using a shallow block takes care of it. I'm not sure that it's an expected behaviour from Rails but I've committed the change in r11851. Wrapping the routes in a single scope now generates all routes with that scope properly.
--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------

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

  • カテゴリIssues_2 にセット
  • 対象バージョン2.3.2_72 にセット

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

いいね!0
いいね!0