Skip to content

[DEV-14642] Fix sorting on Award Type and add sorting for loans#4637

Open
AHasan-FRB wants to merge 9 commits intoqatfrom
ftr/dev-14642-fix-sorting-on-award-type
Open

[DEV-14642] Fix sorting on Award Type and add sorting for loans#4637
AHasan-FRB wants to merge 9 commits intoqatfrom
ftr/dev-14642-fix-sorting-on-award-type

Conversation

@AHasan-FRB
Copy link
Copy Markdown

@AHasan-FRB AHasan-FRB commented Apr 22, 2026

Description:

Resolved issues with award type not searching correctly due to not using the keyword, rather the text.
Added Awards to sorting.

Technical Details:

  • Changed award type to use keyword and not text via type_description.keyword in places award type is referred to
  • Added Award Type to lookup table mappings

Requirements for PR Merge:

  1. Unit & integration tests updated
  2. API documentation updated (examples listed below)
    1. API Contracts
    2. API UI
    3. Comments
  3. Data validation completed (examples listed below)
    1. Does this work well with the current frontend? Or is the frontend aware of a needed change?
    2. Is performance impacted in the changes (e.g., API, pipeline, downloads, etc.)?
    3. Is the expected data returned with the expected format?
  4. Appropriate Operations ticket(s) created
  5. Jira Ticket(s)
    1. DEV-14642

Explain N/A in above checklist:

@AHasan-FRB AHasan-FRB self-assigned this Apr 22, 2026
@AHasan-FRB AHasan-FRB added the in progress [ISSUE] being worked label Apr 22, 2026
@AHasan-FRB AHasan-FRB added in review [ISSUE] being investigated and removed in progress [ISSUE] being worked labels Apr 27, 2026
@sethstoudenmier sethstoudenmier added ready for review [PR] ready to be reviewed and removed in review [ISSUE] being investigated labels Apr 29, 2026
Copy link
Copy Markdown
Contributor

@zachflanders-frb zachflanders-frb left a comment

Choose a reason for hiding this comment

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

I'm requesting changes to see if we can add a test case to sort by Award Type/Contract Award Type. There is a test test_spending_by_award_sort_recipient_location that you can probably use as a model.

Left a comment about maybe not needing to check for type_description in the views, but feel free to ignore.

Comment on lines +476 to +477
if sort_by_fields[0] == "type_description":
sort_by_fields[0] = "type_description.keyword"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we need to modify this here since it is updated in the elasticsearch_lookups.

Comment on lines +205 to +206
if sort_by_fields[0] == "type_description":
sort_by_fields[0] = "type_description.keyword"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review [PR] ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants