Skip to content

Commit

Permalink
Merge pull request #928 from MITLibraries/etd-429-author-not-graduated
Browse files Browse the repository at this point in the history
Fix bug in summary report for authors not graduated
  • Loading branch information
jazairi authored Mar 9, 2022
2 parents 203c7cb + 2da2310 commit f6f6a28
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/models/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ def data_authors_not_graduated
row_data = {}
terms = Thesis.all.pluck(:grad_date).uniq.sort
terms.each do |term|
row_data[term] = Thesis.includes(users: :authors).with_files.where('grad_date = ?', term)
.map(&:authors_graduated?).count(false)
row_data[term] = Thesis.with_files.includes(authors: :user).includes(:departments).select do |t|
!t.authors_graduated?
end.uniq.count
end
{
label: 'Authors not graduated',
Expand Down

0 comments on commit f6f6a28

Please sign in to comment.