Skip to content

feat(ui): restore sort by last updated date#5577

Open
stevefulme1 wants to merge 1 commit intoansible:masterfrom
stevefulme1:feat/restore-sort-updated-date
Open

feat(ui): restore sort by last updated date#5577
stevefulme1 wants to merge 1 commit intoansible:masterfrom
stevefulme1:feat/restore-sort-updated-date

Conversation

@stevefulme1
Copy link
Copy Markdown

Summary

  • Adds "Last updated" (updated_at) sort option to the collections search page sort dropdown
  • Updates collection list item to prefer updated_at over pulp_created for the "Updated" date display when available
  • Adds optional updated_at field to CollectionVersionSearch response type

Backend dependency

The frontend sort option sends order_by=updated_at to the v3/plugin/ansible/search/collection-versions/ API. The backend (pulp_ansible) must support this parameter for the sort to work. If updated_at is not yet exposed:

  • The pulp_ansible search endpoint needs to include updated_at in the serializer
  • The collections table should have an index on updated_at for performance

Ref: AAP-67527

Files changed

  • src/components/collection-filter.ts — Added "Last updated" sort option
  • src/api/response-types/collection.ts — Added optional updated_at field
  • src/components/collection-list-item.tsx — Prefer updated_at for date display

Test plan

  • Verify "Last updated" appears in the sort dropdown on collections page
  • Verify sort works when backend supports order_by=updated_at
  • Verify graceful fallback — list item shows pulp_created when updated_at is undefined
  • Verify TypeScript compiles without errors (npm run lint:ts)

🤖 Generated with Claude Code

Add "Last updated" sort option to the collections search page sort
dropdown. Also update the collection list item to prefer updated_at
over pulp_created for the "Updated" display when available.

Ref: AAP-67527

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 this pull request may close these issues.

1 participant