Project

General

Profile

Actions

Defect #31053

closed

Some issue fixtures are set inconsistent tracker id which is not available in the project

Added by Mizuki ISHIKAWA over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Of the test data, issues_005, issues_013 and issues_014 use trackers which should not be available.

[1] pry(main)> Issue.where(id: [5, 13, 14]).select(:id, :project_id, :tracker_id)
=> [#<Issue:0x00007fdab99315c0 id: 5, tracker_id: 1, project_id: 3>,
 #<Issue:0x00007fdab9903fa8 id: 13, tracker_id: 1, project_id: 3>,
 #<Issue:0x00007fdab9903d78 id: 14, tracker_id: 1, project_id: 3>]

[2] pry(main)> Project.find(3).tracker_ids # trackers available for project 3
=> [2, 3]

After applying the patch:

[1] pry(main)> Issue.where(id: [5, 13, 14]).select(:id, :project_id, :tracker_id)
=> [#<Issue:0x00007fdab99315c0 id: 5, tracker_id: 1, project_id: 3>,
 #<Issue:0x00007fdab9903fa8 id: 13, tracker_id: 1, project_id: 3>,
 #<Issue:0x00007fdab9903d78 id: 14, tracker_id: 1, project_id: 3>]

[2] pry(main)> Project.find(3).tracker_ids # trackers available for project 3
=> [1, 2, 3]


Files

fix-fixtures.patch (926 Bytes) fix-fixtures.patch Mizuki ISHIKAWA, 2019-03-19 08:06
Actions

Also available in: Atom PDF