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

Allow selecting relationship fields on field validation #18730

Open
azrikahar opened this issue May 25, 2023 · 0 comments
Open

Allow selecting relationship fields on field validation #18730

azrikahar opened this issue May 25, 2023 · 0 comments
Labels

Comments

@azrikahar
Copy link
Contributor

Describe the Bug

This is meant as a follow up of #14414. Technically the reported issue is no longer reproducible:

firefox_BKhnviDAmu.mp4

That being said, when configuring the rule via the app's dropdown selection, said relationship field is not visible/selectable:

which is technically working as intended since it was an intentional change by #14818 to prevent users from running into #11775.

It is currently still possible to configure the rule using the raw value as a workaround, but ideally the app should allow us to select them.

This issue is meant to track this particular interaction & the actual solution may require resolving #11775 as a whole.

To Reproduce

  1. Create a collection called articles.

  2. Add a translations field.

  3. Add several fields in the articles_translations junction table.

  4. Create a couple entries in articles.

  5. Create a new role.
    . Add create permissions to articles_translations with the following setup:

    {
      "_and": [
        {
          "languages_id": {
            "code": {
              "_eq": "pt-BR"
            }
          }
        }
      ]
    }

    this is where we had to use raw value instead of the dropdown to achieve this rule.

  6. Add a read permissions to languages:

    {
      "_and": [
        {
          "_or": [
            {
              "code": {
                "_eq": "en-US"
              }
            },
            {
              "code": {
                "_eq": "pt-BR"
              }
            }
          ]
        }
      ]
    }

Directus Version

v10.1.1 (main branch)

Hosting Strategy

Self-Hosted (Docker Image)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants