diff --git a/lib/Db/View.php b/lib/Db/View.php
index 224f9b347f..02060e488c 100644
--- a/lib/Db/View.php
+++ b/lib/Db/View.php
@@ -35,7 +35,8 @@
* @method setCreatedAt(string $createdAt)
* @method getFilter(): string
* @method setFilter(string $filter)
- * @method getLastEditBy(): string
+ * @method getViewGroup(): ?string
+ * @method setViewGroup(?string $viewGroup)
* @method setLastEditBy(string $lastEditBy)
* @method getLastEditAt(): string
* @method setLastEditAt(string $lastEditAt)
@@ -72,6 +73,7 @@ class View extends EntitySuper implements JsonSerializable {
protected ?string $columns = null; // json
protected ?string $sort = null; // json
protected ?string $filter = null; // json
+ protected ?string $viewGroup = null;
// virtual properties
protected ?bool $isShared = null;
@@ -207,6 +209,7 @@ public function jsonSerialize(): array {
'ownerDisplayName' => $this->ownerDisplayName,
];
$serialisedJson['filter'] = $this->getFilterArray();
+ $serialisedJson['viewGroup'] = $this->viewGroup;
return $serialisedJson;
}
diff --git a/lib/Migration/Version001000Date20250122000000.php b/lib/Migration/Version001000Date20250122000000.php
new file mode 100644
index 0000000000..a1aa86b175
--- /dev/null
+++ b/lib/Migration/Version001000Date20250122000000.php
@@ -0,0 +1,40 @@
+hasTable('tables_views')) {
+ $table = $schema->getTable('tables_views');
+ if (!$table->hasColumn('view_group')) {
+ $table->addColumn('view_group', Types::STRING, [
+ 'notnull' => false,
+ 'default' => null,
+ 'length' => 255,
+ ]);
+ }
+ }
+
+ return $schema;
+ }
+}
diff --git a/lib/Service/ViewService.php b/lib/Service/ViewService.php
index 42fde22ace..f9a324d38f 100644
--- a/lib/Service/ViewService.php
+++ b/lib/Service/ViewService.php
@@ -262,7 +262,7 @@ public function update(int $id, array $data, ?string $userId = null, bool $skipT
throw new PermissionError('PermissionError: can not update view with id ' . $id);
}
- $updatableParameter = ['title', 'emoji', 'description', 'sort', 'filter', 'columns', 'columnSettings'];
+ $updatableParameter = ['title', 'emoji', 'description', 'sort', 'filter', 'columns', 'columnSettings', 'viewGroup'];
foreach ($data as $key => $value) {
if (!in_array($key, $updatableParameter)) {
diff --git a/src/modules/modals/ViewSettings.vue b/src/modules/modals/ViewSettings.vue
index fef14d5f89..6849af26c9 100644
--- a/src/modules/modals/ViewSettings.vue
+++ b/src/modules/modals/ViewSettings.vue
@@ -35,6 +35,16 @@