Project

General

Profile

Actions

Defect #35655

closed

Create duplicated follows relations fails with 500 internal error

Defect #35655: Create duplicated follows relations fails with 500 internal error

Added by Marius BĂLTEANU over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Issues
Target version:
Resolution:
Fixed
Affected version:

Description

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'


Files


Related issues 1 (0 open — 1 closed)

Related to Redmine - Feature #33418: Bulk addition of related issuesClosedMarius BĂLTEANUActions

Updated by Marius BĂLTEANU over 5 years ago Actions #1

Updated by Marius BĂLTEANU over 5 years ago Actions #2

  • Subject changed from Create duplicated follows relation fails with 500 internal error to Create duplicated follows relations fails with 500 internal error

Updated by Marius BĂLTEANU over 5 years ago Actions #4

  • Status changed from New to Resolved
  • Resolution set to Fixed

Fixed in r21150.

Updated by Marius BĂLTEANU over 5 years ago Actions #5

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom