Defect #31053

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

Added by Mizuki ISHIKAWA 7 months ago. Updated 4 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Code cleanup/refactoring
Target version:4.1.0
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]

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

Associated revisions

Revision 18309
Added by Go MAEDA 4 months ago

Some issue fixtures are set inconsistent tracker id which is not available in the project (#31053).

Patch by Mizuki ISHIKAWA.

History

#1 Updated by Mizuki ISHIKAWA 7 months ago

I confirmed that all tests were successful after applying the patch.

#2 Updated by Go MAEDA 4 months ago

  • Tracker changed from Patch to Defect
  • Subject changed from Fix fixtures with incorrect value to Some issue fixtures are set inconsistent tracker id which is not available in the project
  • Status changed from New to Confirmed
  • Target version set to 4.1.0

#3 Updated by Go MAEDA 4 months ago

  • Status changed from Confirmed to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the fix. Thanks.

Also available in: Atom PDF