Skip to content

Add Sorting Capability for finished_at and failed_at Fields #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hatsu38 opened this issue Feb 19, 2025 · 3 comments · May be fixed by #261
Open

Add Sorting Capability for finished_at and failed_at Fields #246

hatsu38 opened this issue Feb 19, 2025 · 3 comments · May be fixed by #261

Comments

@hatsu38
Copy link

hatsu38 commented Feb 19, 2025

Feature Request: Sorting by finished_at and failed_at fields

It would be very useful if the mission_control-jobs gem could support sorting jobs not only by their jobed times but also by other relevant timestamps such as finished_at and failed_at.

Example Use Cases:

This would be particularly handy when you want to view jobs that have recently failed.

Image

@film42
Copy link

film42 commented Mar 3, 2025

To be honest, I was a little confused when I opened the failed queue and found it sorted oldest to newest. I would prefer the failed queue to follow the finish queue, showing newest jobs first.

Here's my expereince:

I was expecting an email to be delivered but it didn't happen. I checked the finished queue and found no matching jobs around the time it should have finished. I checked the failed queue and saw "21 days ago" and thought, "maybe solidqueue dropped it?" Only then did I see they were ordered oldest to newest, and I had to click 5-6 pages in to see the most recent failed job.

@ibrahima
Copy link

I agree, I was hoping for a change like #210 to make it easier to get to the recent jobs, but I also feel like changing the default order should be much easier and IMO shouldn't be controversial. Making it sortable would also be great but that's a bigger UI change. It would be consistent with the "Finished Jobs" tab as well. Hmm... might be worth submitting a PR just to change to see if it would be accepted.

@hatsu38
Copy link
Author

hatsu38 commented May 15, 2025

I also found the default sorting by oldest first confusing — I definitely see value in changing it to show the most recent jobs first. I’ll try creating a pull request to sort them in descending order by default!

hatsu38 added a commit to hatsu38/mission_control-jobs that referenced this issue May 15, 2025
Updated the default ordering for job executions to sort by job_id in
descending order (job_id: :desc) instead of ascending. This change makes
recently finished or failed jobs appear at the top of the list, aligning
with expected UX and improving discoverability.This change addresses
rails#246.
@hatsu38 hatsu38 linked a pull request May 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants