Skip to content

Commit

Permalink
dont count rejected leaves, correct wording
Browse files Browse the repository at this point in the history
  • Loading branch information
oma-s committed Apr 22, 2024
1 parent ca112e9 commit c33c1da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/sprint_feedback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ def turnover_per_storypoint_against_avarage
private

def leaves
@leaves ||= user.leaves.select { _1.leave_during.overlaps?(sprint.sprint_during) }
@leaves ||= user.leaves.not_rejected.select { _1.leave_during.overlaps?(sprint.sprint_during) }
end

def count_days(status)
leaves.select { |e| e.public_send("#{status}?") }
def count_days(type)
leaves.select { |e| e.public_send("#{type}?") }
.flat_map(&:days).count { |e| sprint.sprint_during.include? e }
end
end

0 comments on commit c33c1da

Please sign in to comment.