Skip to content

Commit

Permalink
pkp#7709 Added missing date range filter to the editorial statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Nov 25, 2022
1 parent 7e7f597 commit 25117c2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ protected function _getDaysToDecisionsObject($decisions)
public function countImported() {
return $this->_getBaseQuery()
->whereColumn('s.date_submitted', '>', 'pi.date_published')
->when($this->dateStart, fn (Builder $q) => $q->where('s.date_submitted', '>=', $this->dateStart))
->when($this->dateEnd, fn (Builder $q) => $q->where('s.date_submitted', '<=', $this->dateEnd))
->count();
}

Expand All @@ -466,6 +468,8 @@ public function countImported() {
public function countInProgress() {
return $this->_getBaseQuery()
->where('s.submission_progress', '<>', 0)
->when($this->dateStart, fn (Builder $q) => $q->where('s.date_submitted', '>=', $this->dateStart))
->when($this->dateEnd, fn (Builder $q) => $q->where('s.date_submitted', '<=', $this->dateEnd))
->count();
}

Expand Down

0 comments on commit 25117c2

Please sign in to comment.