Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Use autocomplete ordered by name for admin Contributors dropdown #1848

Merged
merged 2 commits into from May 16, 2022

Conversation

maurizi
Copy link
Contributor

@maurizi maurizi commented May 16, 2022

Overview

Use autocomplete ordered by name for admin Contributors dropdown.

As a side-effect of the method used for sorting the autocomplete list, the Contributor admin list is now also sorted by name - I assume this is fine.

Connects #1643

Demo

localhost_8081_admin_api_source_15_change_

Notes

I think despite contributor being a FK to more than just 3 models, these are the only 3 models that have Django admin support.

Potentially also addresses some of #1206?

Testing Instructions

  • ./scripts/server
  • Go to a Facility Claim, Source, or Api Limit Django admin Change or Add page. instead of an unsorted <select> field for contributors, there should be an autocomplete w/ results sorted by name

Checklist

  • fixup! commits have been squashed
  • CI passes after rebase
  • CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines

@maurizi maurizi force-pushed the feature/mvm/admin-autocomplete-contributors-dropdown branch from 1ba7703 to 235d87e Compare May 16, 2022 15:02
@maurizi maurizi requested a review from jwalgran May 16, 2022 16:40
@jwalgran
Copy link
Contributor

Looking at this now.

@jwalgran
Copy link
Contributor

jwalgran commented May 16, 2022

As a side-effect of the method used for sorting the autocomplete list, the Contributor admin list is now also sorted by name - I assume this is fine.

Yes. The minor testing convenience of having the most recently registered contributor at the top of the list is not nearly as useful at this improvement.

Copy link
Contributor

@jwalgran jwalgran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed. 👍

@jwalgran jwalgran assigned maurizi and unassigned jwalgran May 16, 2022
@maurizi maurizi merged commit 00818a6 into develop May 16, 2022
@maurizi maurizi deleted the feature/mvm/admin-autocomplete-contributors-dropdown branch May 16, 2022 19:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants