Defect #35656

When importing issue relations, the validation messages are not shown in the UI

Added by Marius BALTEANU about 1 month ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Importers
Target version:Candidate for next minor release
Resolution: Affected version:4.2.0

Description

If you import a CSV with invalid relations, the validations messages are not shown in the UI.

The attached CSV can be used to reproduce the problem and it should generate the following error in the logs:

ActiveRecord::RecordInvalid (Validation failed: Related issue cannot be blank):

app/models/issue_import.rb:289:in `block (2 levels) in build_relations'
app/models/issue_import.rb:252:in `each'
app/models/issue_import.rb:252:in `block in build_relations'
app/models/issue_import.rb:248:in `each_key'
app/models/issue_import.rb:248:in `build_relations'
app/models/issue_import.rb:244:in `extend_object'
app/models/import.rb:215:in `block in run'
app/models/import.rb:142:in `block in read_items'
app/models/import.rb:256:in `block in read_rows'
app/models/import.rb:255:in `read_rows'
app/models/import.rb:136:in `read_items'
app/models/import.rb:194:in `run'
app/controllers/imports_controller.rb:91:in `run'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'

RelationTest (2).csv Magnifier (134 Bytes) Marius BALTEANU, 2021-08-01 16:05

Also available in: Atom PDF