payload icon indicating copy to clipboard operation
payload copied to clipboard

db-postgres: relationship field filterOptions returning unexpected results

Open JPrisk opened this issue 1 year ago • 1 comments

Link to reproduction

https://github.com/JPrisk/payload/tree/postgres-relationships

Describe the Bug

This is a repeat of this issue except i've created a new reproduction because @PatrikKozak was having difficulty reproducing the issue

To Reproduce

The following steps require you to run pnpm dev _community with your PAYLOAD_DATABASE environment set for the following options:

MongoDB

  1. navigate to http://localhost:3000/admin/collections/posts
  2. navigate to the post titled "example post 2 [published]"
  3. click the "Related Posts" dropdown
  4. observe [draft] posts being filtered from the results

Postgres

  1. navigate to http://localhost:3000/admin/collections/posts/2
  2. click the "Related Posts" dropdown
  3. observe [draft] posts being included in the results

Payload Version

latest

Adapters and Plugins

db-postgres

JPrisk avatar May 09 '24 03:05 JPrisk

very likely a duplicate of #5151

JPrisk avatar May 09 '24 03:05 JPrisk

Hey @JPrisk - issue #5151 has been closed with this PR.

And thank you for the above reproduction! With your reproduction and using the postgres adapter, I'm observing that drafts are being filtered out.

Can you confirm with latest if you are still experiencing this?

PatrikKozak avatar May 16 '24 19:05 PatrikKozak

Hey @PatrikKozak - thanks for releasing the fix, yes this can now be closed ✅

JPrisk avatar May 16 '24 22:05 JPrisk

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.

github-actions[bot] avatar Sep 07 '24 04:09 github-actions[bot]