omeka / omeka/plugin-ExhibitBuilder

Sorting by date added field

Open
#119 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
PHP
Stars
25
Forks
37
PR merge metrics
No merged PRs in 30d

Description

The sorting by Date Added appears to be sorting on the id field, not the actual date added field.

I'm sure for 99% of users, this is totally fine. In my case, I want to sort my exhibits by a specified date (each exhibit represents a different event and I want to list them chronologically). I'm doing a hacky thing and manually setting Date Added in the database to the event date. My events are listed in the proper descending order if I sort by Recent, but if I sort by Date Added it is sorting on id.

I've hacked in a fix (In ExhibitController, changed _getBrowseDefaultSort function so that the default case matches the recent case and except using 'a' instead of 'd'), so I'm good.

I don't think that this is ever an issue unless people are monkeying with Date Added in the database. Ideally it would be great to have more sorting options for exhibits, but if not, hopefully by at least posting this someone else will be saved from a lot of confusion.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in ExhibitController at _getBrowseDefaultSort, comparing the Date Added default case with the Recent case described in the issue. Confirm that sorting by Date Added uses the actual date-added field rather than the exhibit id, and verify that exhibits with manually set dates appear in chronological order.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.