Defect #35131 » 0001-Allow-Unique-ID-and-relation-fields-to-be-auto-mappe.patch
| app/models/issue_import.rb | ||
|---|---|---|
|
'start_date' => 'field_start_date',
|
||
|
'due_date' => 'field_due_date',
|
||
|
'estimated_hours' => 'field_estimated_hours',
|
||
|
'done_ratio' => 'field_done_ratio'
|
||
|
'done_ratio' => 'field_done_ratio',
|
||
|
'unique_id' => 'field_unique_id',
|
||
|
'relation_duplicates' => 'label_duplicates',
|
||
|
'relation_duplicated' => 'label_duplicated_by',
|
||
|
'relation_blocks' => 'label_blocks',
|
||
|
'relation_blocked' => 'label_blocked_by',
|
||
|
'relation_relates' => 'label_relates_to',
|
||
|
'relation_precedes' => 'label_precedes',
|
||
|
'relation_follows' => 'label_follows',
|
||
|
'relation_copied_to' => 'label_copied_to',
|
||
|
'relation_copied_from' => 'label_copied_from'
|
||
|
}
|
||
|
def self.menu_item
|
||
| test/fixtures/files/import_issues_auto_mapping.csv | ||
|---|---|---|
|
priority;Subject;start_date;parent;private;progress;custom;"target version";category;user;estimated_hours;tracker;status;database;cf_6;
|
||
|
High;First;2015-07-08;;no;;PostgreSQL;;New category;dlopper;1;bug;new;"PostgreSQL, Oracle";2;"Column with empty header"
|
||
|
priority;Subject;start_date;parent;private;progress;custom;"target version";category;user;estimated_hours;tracker;status;database;cf_6;unique_id;"Is duplicate of"
|
||
|
High;First;2015-07-08;;no;;PostgreSQL;;New category;dlopper;1;bug;new;"PostgreSQL, Oracle";2;1;4;"Column with empty header"
|
||
| test/functional/imports_controller_test.rb | ||
|---|---|---|
|
assert_select 'select[name=?]', 'import_settings[mapping][cf_1]' do
|
||
|
assert_select 'option[value="13"][selected="selected"]', :text => 'database'
|
||
|
end
|
||
|
# 'unique_id' should be auto selected because
|
||
|
# - 'unique_id' exists in the import file
|
||
|
assert_select 'select[name=?]', 'import_settings[mapping][unique_id]' do
|
||
|
assert_select 'option[value="15"][selected="selected"]', :text => 'unique_id'
|
||
|
end
|
||
|
# 'relation_duplicates' should be auto selected because
|
||
|
# - 'Is duplicate of' exists in the import file
|
||
|
assert_select 'select[name=?]', 'import_settings[mapping][relation_duplicates]' do
|
||
|
assert_select 'option[value="16"][selected="selected"]', :text => 'Is duplicate of'
|
||
|
end
|
||
|
end
|
||
|
def test_post_mapping_should_update_mapping
|
||
- « Previous
- 1
- 2
- 3
- 4
- Next »