Browse Source

Merge branch 'standalone_develop' into pre_trustie_server

pull/346/head
yystopf 1 year ago
parent
commit
91125c5e44
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/controllers/api/pm/sprint_issues_controller.rb

+ 2
- 1
app/controllers/api/pm/sprint_issues_controller.rb View File

@@ -17,7 +17,8 @@ class Api::Pm::SprintIssuesController < Api::Pm::BaseController
data = []
curren_issues = @issues.group(:status_id, :due_date).count
total_count = @issues.count
cardinality = BigDecimal.new(total_count) / BigDecimal.new(time_count)
cardinality = (total_count.zero? || time_count.zero?) ? 0 : total_count.to_f / time_count.to_f
# cardinality = BigDecimal.new(total_count) / BigDecimal.new(time_count)
time_count.times do |x|
e_time = start_time + x
completed = curren_issues[[5, e_time]].to_i + curren_issues[[3, e_time]].to_i - @issues.where(pm_issue_type: 3, status_id: 3).size


Loading…
Cancel
Save