From ea12121ddf857616dc5bb63ec15d8bc5012267e6 Mon Sep 17 00:00:00 2001
From: Budibase Staging Release Bot <>
Date: Mon, 2 Oct 2023 08:13:57 +0000
Subject: [PATCH 01/15] Bump version to 2.10.16
---
lerna.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lerna.json b/lerna.json
index 84d7bc0ec1..00a9fb9c0c 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "2.10.16-alpha.19",
+ "version": "2.10.16",
"npmClient": "yarn",
"packages": [
"packages/*"
From 634a2974bd98d506b38ab9e9872807cd2185813a Mon Sep 17 00:00:00 2001
From: Budibase Staging Release Bot <>
Date: Mon, 2 Oct 2023 08:30:36 +0000
Subject: [PATCH 02/15] Bump version to 2.11.0
---
lerna.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lerna.json b/lerna.json
index 00a9fb9c0c..7a7fb9c26e 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "2.10.16",
+ "version": "2.11.0",
"npmClient": "yarn",
"packages": [
"packages/*"
From 7003475cafb6e49939e67a99b763d1cec5421601 Mon Sep 17 00:00:00 2001
From: melohagan <101575380+melohagan@users.noreply.github.com>
Date: Mon, 2 Oct 2023 11:42:04 +0100
Subject: [PATCH 03/15] Refactor FieldSelector to not use BindableSlot (#11942)
---
.../automation/SetupPanel/RowSelector.svelte | 31 +++-
.../SetupPanel/RowSelectorTypes.svelte | 152 ++++++++----------
2 files changed, 92 insertions(+), 91 deletions(-)
diff --git a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte
index 8c50689f22..c3097f3072 100644
--- a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte
+++ b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte
@@ -3,6 +3,8 @@
import { Select, Checkbox } from "@budibase/bbui"
import { createEventDispatcher } from "svelte"
import RowSelectorTypes from "./RowSelectorTypes.svelte"
+ import DrawerBindableSlot from "../../common/bindings/DrawerBindableSlot.svelte"
+ import AutomationBindingPanel from "../../common/bindings/ServerBindingPanel.svelte"
const dispatch = createEventDispatcher()
@@ -108,14 +110,29 @@
{#each schemaFields as [field, schema]}
{#if !schema.autocolumn && schema.type !== "attachment"}
-
+ value={value[field]}
+ on:change={e => onChange(e, field)}
+ {bindings}
+ allowJS={true}
+ updateOnChange={false}
+ drawerLeft="260px"
+ >
+
+
{/if}
{#if isUpdateRow && schema.type === "link"}
diff --git a/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte b/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte
index 9111df0adc..8cf1ecf6de 100644
--- a/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte
+++ b/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte
@@ -8,7 +8,6 @@
} from "@budibase/bbui"
import LinkedRowSelector from "components/common/LinkedRowSelector.svelte"
import DrawerBindableInput from "../../common/bindings/DrawerBindableInput.svelte"
- import DrawerBindableSlot from "../../common/bindings/DrawerBindableSlot.svelte"
import ModalBindableInput from "../../common/bindings/ModalBindableInput.svelte"
import AutomationBindingPanel from "../../common/bindings/ServerBindingPanel.svelte"
import Editor from "components/integration/QueryEditor.svelte"
@@ -31,88 +30,73 @@
}
-
onChange(e, field)}
- {bindings}
- allowJS={true}
- updateOnChange={false}
- drawerLeft="260px"
->
- {#if schemaHasOptions(schema) && schema.type !== "array"}
-
+
+{:else if schema.type === "link"}
+
onChange(e, field)}
+ />
+{:else if schema.type === "string" || schema.type === "number"}
+ onChange(e, field)}
+ label={field}
+ type="string"
+ bindings={parsedBindings}
+ fillWidth={true}
+ allowJS={true}
+ updateOnChange={false}
+ />
+{/if}
From cf4591597c7e3033e553636082ec2e6e4da77422 Mon Sep 17 00:00:00 2001
From: Budibase Staging Release Bot <>
Date: Mon, 2 Oct 2023 10:42:24 +0000
Subject: [PATCH 04/15] Bump version to 2.11.1
---
lerna.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lerna.json b/lerna.json
index 7a7fb9c26e..164bd15b71 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "2.11.0",
+ "version": "2.11.1",
"npmClient": "yarn",
"packages": [
"packages/*"
From ce9010942227fe60356c6e488faa614e62b27914 Mon Sep 17 00:00:00 2001
From: Adria Navarro
Date: Mon, 2 Oct 2023 13:37:06 +0200
Subject: [PATCH 05/15] Fixing filtering on user column
---
.../src/components/grid/cells/BBReferenceCell.svelte | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte b/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte
index be99c9f633..79eedec205 100644
--- a/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte
+++ b/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte
@@ -3,6 +3,8 @@
import RelationshipCell from "./RelationshipCell.svelte"
import { FieldSubtype } from "@budibase/types"
+ export let api
+
const { API } = getContext("grid")
const { subtype } = $$props.schema
@@ -17,8 +19,10 @@
throw `Search for '${subtype}' not implemented`
}
+ const email = Object.values(searchParams.query.string)[0]
+
const results = await API.searchUsers({
- ...searchParams,
+ email,
})
// Mapping to the expected data within RelationshipCell
@@ -31,6 +35,7 @@
Date: Mon, 2 Oct 2023 13:41:07 +0200
Subject: [PATCH 06/15] Add comment
---
.../src/components/grid/cells/BBReferenceCell.svelte | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte b/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte
index 79eedec205..b4168474b0 100644
--- a/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte
+++ b/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte
@@ -19,6 +19,7 @@
throw `Search for '${subtype}' not implemented`
}
+ // As we are overriding the search function from RelationshipCell, we want to map one shape to the expected one for the specific API
const email = Object.values(searchParams.query.string)[0]
const results = await API.searchUsers({
From 15bec7aae858f66447b28b1024f4fa54dad3855f Mon Sep 17 00:00:00 2001
From: Adria Navarro
Date: Mon, 2 Oct 2023 14:51:48 +0200
Subject: [PATCH 07/15] Refresh relationships on column link add/edit/delete
---
.../backend/DataTable/modals/CreateEditColumn.svelte | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte
index 1c64dfe5ec..c67ce67d57 100644
--- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte
+++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte
@@ -277,10 +277,7 @@
dispatch("updatecolumns")
gridDispatch("close-edit-column")
- if (
- saveColumn.type === LINK_TYPE &&
- saveColumn.relationshipType === RelationshipType.MANY_TO_MANY
- ) {
+ if (saveColumn.type === LINK_TYPE) {
// Fetching the new tables
tables.fetch()
// Fetching the new relationships
@@ -312,6 +309,11 @@
confirmDeleteDialog.hide()
dispatch("updatecolumns")
gridDispatch("close-edit-column")
+
+ if (editableColumn.type === LINK_TYPE) {
+ // Updating the relationships
+ datasources.fetch()
+ }
}
} catch (error) {
notifications.error(`Error deleting column: ${error.message}`)
From fc62edf4cc2055605d6624952290d6003c386571 Mon Sep 17 00:00:00 2001
From: mike12345567
Date: Mon, 2 Oct 2023 13:53:58 +0100
Subject: [PATCH 08/15] Fixing swagger API version, updating to use old 3.0.46
as version 3.0.47 does not appear to running correctly.
---
packages/sdk/scripts/generate-sdk.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/sdk/scripts/generate-sdk.sh b/packages/sdk/scripts/generate-sdk.sh
index 82cb3f1d36..cde54c5a5c 100755
--- a/packages/sdk/scripts/generate-sdk.sh
+++ b/packages/sdk/scripts/generate-sdk.sh
@@ -19,7 +19,7 @@ docker run --rm \
-v ${PWD}/generated:/generated \
-v ${PWD}/config.json:/config.json \
-u $(id -u):$(id -g) \
- swaggerapi/swagger-codegen-cli-v3 generate \
+ swaggerapi/swagger-codegen-cli-v3:3.0.46 generate \
-i /openapi.yml \
-l javascript \
-o /generated \
@@ -34,4 +34,4 @@ if [[ -f "openapi.yaml" ]]; then
fi
if [[ -d "generated" ]]; then
rm -r generated
-fi
\ No newline at end of file
+fi
From 70f920376f7cfbb904293ffd4589bf26dbb0ea00 Mon Sep 17 00:00:00 2001
From: Budibase Staging Release Bot <>
Date: Mon, 2 Oct 2023 12:54:55 +0000
Subject: [PATCH 09/15] Bump version to 2.11.2
---
lerna.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lerna.json b/lerna.json
index 164bd15b71..3b28c2d3b1 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "2.11.1",
+ "version": "2.11.2",
"npmClient": "yarn",
"packages": [
"packages/*"
From 46c40f011e3297e16844ce1005bfc6d784794ce1 Mon Sep 17 00:00:00 2001
From: Adria Navarro
Date: Mon, 2 Oct 2023 15:00:51 +0200
Subject: [PATCH 10/15] Fix multiple relationship display
---
.../_components/panels/Relationships.svelte | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/panels/Relationships.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/panels/Relationships.svelte
index 384b87e11d..9b613c57e7 100644
--- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/panels/Relationships.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/panels/Relationships.svelte
@@ -21,15 +21,21 @@
function getRelationships(tables) {
const relatedColumns = {}
- tables.forEach(({ name: tableName, schema }) => {
+ tables.forEach(({ name: tableName, schema, _id: tableId }) => {
Object.values(schema).forEach(column => {
if (column.type !== "link") return
- relatedColumns[column._id] ??= {}
- relatedColumns[column._id].through =
- relatedColumns[column._id].through || column.through
+ const columnId =
+ column.through ||
+ (column.main
+ ? `${tableId}_${column.fieldName}__${column.tableId}_${column.foreignKey}`
+ : `${column.tableId}_${column.foreignKey}__${tableId}_${column.fieldName}`)
- relatedColumns[column._id][column.main ? "from" : "to"] = {
+ relatedColumns[columnId] ??= {}
+ relatedColumns[columnId].through =
+ relatedColumns[columnId].through || column.through
+
+ relatedColumns[columnId][column.main ? "from" : "to"] = {
...column,
tableName,
}
From aa0ec1c7cbc6d5395b6db9fd49082c7e1974d67f Mon Sep 17 00:00:00 2001
From: Adria Navarro
Date: Mon, 2 Oct 2023 15:12:35 +0200
Subject: [PATCH 11/15] Fix validating on relationshipType change
---
.../backend/Datasources/CreateEditRelationship.svelte | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte
index 9c98bdc2e5..aa07fb630c 100644
--- a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte
+++ b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte
@@ -57,7 +57,8 @@
label: table.name,
value: table._id,
}))
- $: valid = getErrorCount(errors) === 0 && allRequiredAttributesSet()
+ $: valid =
+ getErrorCount(errors) === 0 && allRequiredAttributesSet(relationshipType)
$: isManyToMany = relationshipType === RelationshipType.MANY_TO_MANY
$: isManyToOne = relationshipType === RelationshipType.MANY_TO_ONE
@@ -114,7 +115,7 @@
return Object.entries(errors).filter(entry => !!entry[1]).length
}
- function allRequiredAttributesSet() {
+ function allRequiredAttributesSet(relationshipType) {
const base = getTable(fromId) && getTable(toId) && fromColumn && toColumn
if (relationshipType === RelationshipType.MANY_TO_ONE) {
return base && fromPrimary && fromForeign
From 3546dfc0cf7b24f0153535f2d0b456917a973518 Mon Sep 17 00:00:00 2001
From: Adria Navarro
Date: Mon, 2 Oct 2023 15:18:28 +0200
Subject: [PATCH 12/15] Validate
---
.../backend/Datasources/CreateEditRelationship.svelte | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte
index aa07fb630c..9e42dfecd9 100644
--- a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte
+++ b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte
@@ -125,9 +125,10 @@
}
function validate() {
- if (!allRequiredAttributesSet() && !hasValidated) {
+ if (!allRequiredAttributesSet(relationshipType) && !hasValidated) {
return
}
+
hasValidated = true
errorChecker.setType(relationshipType)
const fromTable = getTable(fromId),
From 6604f439c44410bb517611311ebb9c8582d9e169 Mon Sep 17 00:00:00 2001
From: Budibase Staging Release Bot <>
Date: Mon, 2 Oct 2023 13:32:54 +0000
Subject: [PATCH 13/15] Bump version to 2.11.3
---
lerna.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lerna.json b/lerna.json
index 3b28c2d3b1..c8acec9337 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "2.11.2",
+ "version": "2.11.3",
"npmClient": "yarn",
"packages": [
"packages/*"
From 2df32b7b28ed76be6fe4bea6b7de6b4721c2303d Mon Sep 17 00:00:00 2001
From: Adria Navarro
Date: Mon, 2 Oct 2023 15:34:26 +0200
Subject: [PATCH 14/15] Use _id if populated
---
.../[datasourceId]/_components/panels/Relationships.svelte | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/panels/Relationships.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/panels/Relationships.svelte
index 9b613c57e7..1a46ecb540 100644
--- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/panels/Relationships.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/panels/Relationships.svelte
@@ -27,6 +27,7 @@
const columnId =
column.through ||
+ column._id ||
(column.main
? `${tableId}_${column.fieldName}__${column.tableId}_${column.foreignKey}`
: `${column.tableId}_${column.foreignKey}__${tableId}_${column.fieldName}`)
From c7c81c348b382c522d5f07818721dab9e6339dba Mon Sep 17 00:00:00 2001
From: Budibase Staging Release Bot <>
Date: Mon, 2 Oct 2023 13:56:14 +0000
Subject: [PATCH 15/15] Bump version to 2.11.4
---
lerna.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lerna.json b/lerna.json
index c8acec9337..9f8538dfb0 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "2.11.3",
+ "version": "2.11.4",
"npmClient": "yarn",
"packages": [
"packages/*"