Skip to content

Commit

Permalink
correct scope in Digest#get_created_issue_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Leishman committed Mar 23, 2017
1 parent 458fac9 commit 9172817
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/redmine_digest/digest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def get_changed_issue_ids
def get_created_issue_ids
issues = Issue.where('issues.project_id in (?)', project_ids).
where('issues.created_on >= ? and issues.created_on < ?', time_from, time_to)
issues.where('(issues.assigned_to_id = ? OR issues.author_id = ?)', user.id, user.id) if all_involved_only?
issues = issues.where('(issues.assigned_to_id = ? OR issues.author_id = ?)', user.id, user.id) if all_involved_only?
issues.uniq.pluck(:id)
end

Expand Down
2 changes: 1 addition & 1 deletion test/unit/redmine_digest/digest_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def test_all_involved
)
time_to = Journal.last.created_on + 1.hour
digest = RedmineDigest::Digest.new(rule, time_to)
exp_ids = [1, 2, 4, 6, 7, 8, 11, 12, 14]
exp_ids = [1, 2, 4, 6, 7, 8, 11, 14]
issue_ids = digest.issues.map(&:id).sort
assert_equal exp_ids, issue_ids
end
Expand Down

0 comments on commit 9172817

Please sign in to comment.