プロジェクト

全般

プロフィール

Vote #81558

完了

Create duplicated follows relations fails with 500 internal error

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

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

0%

予定工数:
category_id:
2
version_id:
170
issue_org_id:
35655
author_id:
107353
assigned_to_id:
107353
comments:
5
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
152
ステータス-->[Closed]

説明

It seems that the relation validations are not covering all the cases and if you try to add two duplicated follows relations, the request fails with 500 internal error. The issue reproduces only on 4.2.* versions and it's caused by #33418.

I, [2021-08-01T16:29:31.426087 #19530]  INFO -- : Completed 500 Internal Server Error in 117ms (ActiveRecord: 70.3ms | Allocations: 8146)


F, [2021-08-01T16:29:31.427135 #19530] FATAL -- :   
ActiveRecord::RecordNotUnique (Mysql2::Error: Duplicate entry '1-2' for key 'issue_relations.index_issue_relations_on_issue_from_id_and_issue_to_id'):
  
app/controllers/issue_relations_controller.rb:67:in `block in create'
app/controllers/issue_relations_controller.rb:51:in `each'
app/controllers/issue_relations_controller.rb:51:in `create'


journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Attached a patch to fix this.
--------------------------------------------------------------------------------
Fixed in r21150.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,33418,Bulk addition of related issues

Admin Redmine さんが約4年前に更新

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

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

いいね!0
いいね!0