Defect #35656

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

Added by Marius BALTEANU about 1 year ago. Updated 6 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Marius BALTEANU% Done:

0%

Category:Importers
Target version:4.2.4
Resolution:Fixed 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


Related issues

Related to Redmine - Feature #28198: Support issue relations when importing issues Closed
Duplicated by Redmine - Defect #36592: Import hangs when "related to" issue could not be created Closed

Associated revisions

Revision 21422
Added by Marius BALTEANU 6 months ago

Fix import with issue relations and invalid issues hangs without any error message in UI (#35656).

Revision 21424
Added by Marius BALTEANU 6 months ago

Merged r21422 to 4.2-stable (#35656).

History

#1 Updated by Marius BALTEANU 6 months ago

  • Duplicated by Defect #36592: Import hangs when "related to" issue could not be created added

#2 Updated by Marius BALTEANU 6 months ago

  • Assignee set to Marius BALTEANU
  • Target version changed from Candidate for next minor release to 4.2.4

#3 Updated by Marius BALTEANU 6 months ago

  • Related to Feature #28198: Support issue relations when importing issues added

#4 Updated by Marius BALTEANU 6 months ago

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

Also available in: Atom PDF