Skip to content

Commit

Permalink
Add ordering of issues by date published (pkp#4296)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagolepidus committed Jun 4, 2024
1 parent 934fb56 commit 687923d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions classes/issue/Collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ public function filterByIssueIds(?array $issueIds): static
public function orderBy(string $orderByConstant): static
{
$this->resultOrderings = match ($orderByConstant) {
static::ORDERBY_DATE_PUBLISHED => [
['orderBy' => 'i.date_published', 'direction' => static::ORDER_DIR_DESC]
],
static::ORDERBY_LAST_MODIFIED => [
['orderBy' => 'i.last_modified', 'direction' => static::ORDER_DIR_DESC]
],
Expand Down

0 comments on commit 687923d

Please sign in to comment.