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: separate sort and search fields when looking up relationship. #5964

Merged
merged 1 commit into from
May 20, 2024

Conversation

andershermansen
Copy link
Contributor

Description

Default sort is used as searching field which is causing unexpected behaviour described in #4815 and #5222 This bugfix separates which field is used for sorting and which is used for searching.

Fixes: #4815 #5222

  • I have read and understand the CONTRIBUTING.md document in this repository.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • Existing test suite passes locally with my changes
  • I have made corresponding changes to the documentation

@andershermansen andershermansen changed the title fix: separate sort and search fields when looking up relationsip. fix: separate sort and search fields when looking up relationship. Apr 23, 2024
@denolfe denolfe self-assigned this May 20, 2024
@denolfe
Copy link
Member

denolfe commented May 20, 2024

Thanks @andershermansen . Triggering tests now.

@denolfe denolfe merged commit c009219 into payloadcms:main May 20, 2024
32 of 33 checks passed
@andershermansen
Copy link
Contributor Author

@denolfe Glad that my contribution was merged. For v3/beta I created a PR with the same change.
#6440

@denolfe
Copy link
Member

denolfe commented May 20, 2024

@andershermansen Amazing, I will take a look 👍

denolfe pushed a commit that referenced this pull request May 20, 2024
…6440)

## Description

Default sort is used as searching field which is causing unexpected
behaviour described in #4815
and #5222 This bugfix
separates which field is used for sorting and which is used for
searching.

Fixes: #4815
#5222

@denolfe This fix is a port of the fix in
[#5964](#5964) to beta branch.

- [X] I have read and understand the
[CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md)
document in this repository.

## Type of change

- [X] Bug fix (non-breaking change which fixes an issue)

## Checklist:

- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] Existing test suite passes locally with my changes
- [ ] I have made corresponding changes to the documentation
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.

Relationship field: filter on wrong field with defaultSort
2 participants