GenomicDataInfrastructure / gdi-userportal-dataset-discovery-service

0 stars 1 forks source link

Revert sort title string #97

Closed hcvdwerf closed 2 months ago

hcvdwerf commented 2 months ago

🚀 Pull Request Checklist

Summary by Sourcery

Revert changes to the sort string handling in dataset search queries to fix sorting issues.

Bug Fixes:

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request reverts changes related to the sorting of dataset titles in the CKAN query API. The modification of the 'sort' parameter, which previously replaced 'title' with 'title_string', has been removed from both BeaconDatasetsRepository and CkanDatasetsRepository classes. The original 'sort' parameter from the query is now directly passed to the CKAN API without any string manipulation.

File-Level Changes

Files Changes
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/CkanDatasetsRepository.java
Removed the logic that modified the 'sort' parameter by replacing 'title' with 'title_string'
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/CkanDatasetsRepository.java
Simplified the call to ckanQueryApi.packageSearch() by directly passing query.getSort() instead of the modified sortString
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/CkanDatasetsRepository.java
Removed the local variable 'sortString' and associated null checks

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.