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(Supabase Node): Allow for filtering on the same field multiple times #12429

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

dana-gill
Copy link
Contributor

@dana-gill dana-gill commented Jan 2, 2025

Summary

This PR allows filtering on the same field multiple times

Workflow for testing:

{
  "nodes": [
    {
      "parameters": {
        "operation": "getAll",
        "tableId": "my_table",
        "returnAll": true,
        "matchType": "allFilters",
        "filters": {
          "conditions": [
            {
              "keyName": "created_at",
              "condition": "gt",
              "keyValue": "={{ $json.greaterThan }}"
            },
            {
              "keyName": "created_at",
              "condition": "lt",
              "keyValue": "={{ $json.lessThan }}"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.supabase",
      "typeVersion": 1,
      "position": [
        280,
        200
      ],
      "id": "59b409d0-4046-4612-b091-dca68d5bdefd",
      "name": "Supabase1",
      "credentials": {
        "supabaseApi": {
          "id": "f7FuHuk2EpV4d9bH",
          "name": "Supabase account"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "df329893-69c7-49e4-bdba-5f44a2007e35",
              "name": "lessThan",
              "value": "2025-01-02 08:07:36.102231+00",
              "type": "string"
            },
            {
              "id": "f7080c12-08cd-41e4-9a2e-473d7bbdc775",
              "name": "greaterThan",
              "value": "2025-01-02 08:03:43.952051+00",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        40,
        200
      ],
      "id": "7acaee5c-393a-481f-8531-ab78039bbebd",
      "name": "Edit Fields"
    }
  ],
  "connections": {
    "Supabase1": {
      "main": [
        []
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Supabase1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {
    "Supabase1": [
      {
        "id": 4,
        "created_at": "2025-01-02T08:03:49.790638+00:00",
        "name": "jaja"
      },
      {
        "id": 5,
        "created_at": "2025-01-02T08:03:53.075208+00:00",
        "name": "lol"
      },
      {
        "id": 6,
        "created_at": "2025-01-02T08:07:33.870578+00:00",
        "name": "lol"
      }
    ]
  }
}

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/NODE-2107/community-issue-manual-filtering-bug-with-supabase

Closes #11998

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@dana-gill dana-gill changed the title fix(Supabase): Allow for filtering on the same field multiple times fix(Supabase Node): Allow for filtering on the same field multiple times Jan 2, 2025
@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team node/improvement New feature or request labels Jan 2, 2025
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@dana-gill dana-gill marked this pull request as ready for review January 2, 2025 12:22
Copy link
Contributor

@ShireenMissi ShireenMissi left a comment

Choose a reason for hiding this comment

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

Tested Manually as well and it works perfectly 🎉

Copy link
Contributor

github-actions bot commented Jan 3, 2025

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link

cypress bot commented Jan 3, 2025

n8n    Run #8574

Run Properties:  status check passed Passed #8574  •  git commit d7cc789d79: 🌳 master 🖥️ browsers:node18.12.0-chrome107 🤖 PR User 🗃️ e2e/*
Project n8n
Branch Review master
Run status status check passed Passed #8574
Run duration 04m 43s
Commit git commit d7cc789d79: 🌳 master 🖥️ browsers:node18.12.0-chrome107 🤖 PR User 🗃️ e2e/*
Committer Dana
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 484
View all changes introduced in this branch ↗︎

Copy link
Contributor

github-actions bot commented Jan 3, 2025

⚠️ Some Cypress E2E specs are failing, please fix them before merging

1 similar comment
Copy link
Contributor

github-actions bot commented Jan 3, 2025

⚠️ Some Cypress E2E specs are failing, please fix them before merging

@ShireenMissi ShireenMissi force-pushed the node-2107-manual-filtering-supabase branch from c1458c4 to 6f6d8a6 Compare January 3, 2025 16:31
Copy link
Contributor

github-actions bot commented Jan 3, 2025

✅ All Cypress E2E specs passed

@dana-gill dana-gill merged commit d7cc789 into master Jan 3, 2025
37 checks passed
@dana-gill dana-gill deleted the node-2107-manual-filtering-supabase branch January 3, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team node/improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Manual filtering bug with Supabase
2 participants