Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix wrong project order_by of 'name' field #5356

Conversation

matusdrobuliak66
Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 commented Feb 21, 2024

What do these changes do?

  • 🐛 When a client provides a search query parameter when listing projects we join also users table in the db query so we can do full text search for example of name column in users table. When the client in addition provides also the order_by query parameter and is interested in the name field (which is provided by project.name) then the order by query was sorted by users.name and not projects.name. This PR fixes it.

@jsaq007 This is the fix for the issue reported by you

Related issue/s

How to test

pytest tests/unit/with_dbs/02/test_projects_crud_handlers__list_with_query_params.py

Dev Checklist

DevOps Checklist

@matusdrobuliak66 matusdrobuliak66 marked this pull request as ready for review February 21, 2024 13:31
@matusdrobuliak66 matusdrobuliak66 self-assigned this Feb 21, 2024
@matusdrobuliak66 matusdrobuliak66 added this to the Schoggilebe milestone Feb 21, 2024
@matusdrobuliak66 matusdrobuliak66 enabled auto-merge (squash) February 21, 2024 13:35
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@wvangeit wvangeit left a comment

Choose a reason for hiding this comment

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

Nice

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3eb91a9) 87.4% compared to head (f1e484a) 80.9%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5356      +/-   ##
=========================================
- Coverage    87.4%   80.9%    -6.5%     
=========================================
  Files        1313     539     -774     
  Lines       54034   27119   -26915     
  Branches     1172     202     -970     
=========================================
- Hits        47259   21957   -25302     
+ Misses       6525    5112    -1413     
+ Partials      250      50     -200     
Flag Coverage Δ
integrationtests 63.8% <0.0%> (-1.2%) ⬇️
unittests 86.6% <100.0%> (+1.3%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...erver/src/simcore_service_webserver/projects/db.py 97.1% <100.0%> (-0.9%) ⬇️

... and 903 files with indirect coverage changes

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@matusdrobuliak66 matusdrobuliak66 merged commit a5a0a44 into ITISFoundation:master Feb 21, 2024
55 checks passed
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.

6 participants