nasa / cmr-stac

Other
55 stars 21 forks source link

CMR-10132: Fix stac-browser Stac item Search unmapped CMR keys #370

Closed eudoroolivares2016 closed 2 weeks ago

eudoroolivares2016 commented 3 weeks ago

Overview

What is the feature?

Update sorting maps to include a datetime mapping to CMR's startDate field. Refactor sortKeys to map to CMR fields depending if the search is for items or for collections so that we can sort by id field accordingly

What is the Solution?

Adding search context to the query param and a util to direct the request to the correct CMR key field. Also adding a mapping for the datetime field

What areas of the application does this impact?

Testing

Reproduction steps

  1. Navigate to https://radiantearth.github.io/stac-browser/#/external/http:/localhost:3000/stac/ARCTEST ensure that using the Id for the collection search sorting works
  2. ensure that using the Id for the items search sorting works
  3. Ensure that sorting for the collection search sorting by Date and time works as expected
  4. Ensure that sorting for the item search sorting by Date and time works as expected

Attachments

Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.

Checklist

codecov-commenter commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.22%. Comparing base (7a0fcb8) to head (960fc73).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #370 +/- ## ========================================== + Coverage 88.05% 88.22% +0.16% ========================================== Files 24 24 Lines 1164 1180 +16 Branches 256 261 +5 ========================================== + Hits 1025 1041 +16 Misses 139 139 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.