From 5ac58e77236604f02da02ad48945706e9e27e85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 11 Feb 2026 17:25:17 +0100 Subject: [PATCH 1/2] Implement team sequence --- .../Platform/Modules/Projects/Http/Projects/XList.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php b/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php index fe29fdc4da..03e35388f7 100644 --- a/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php +++ b/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php @@ -68,13 +68,13 @@ class XList extends Action ->param('queries', [], $this->getQueriesValidator(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Projects::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->param('total', true, new Boolean(true), 'When set to false, the total count returned will be 0 and will not be calculated.', true) - ->inject('request') ->inject('response') ->inject('dbForPlatform') + ->inject('team') ->callback($this->action(...)); } - public function action(array $queries, string $search, bool $includeTotal, Request $request, Response $response, Database $dbForPlatform) + public function action(array $queries, string $search, bool $includeTotal, Response $response, Database $dbForPlatform, Document $team) { try { $queries = Query::parseQueries($queries); @@ -85,6 +85,10 @@ class XList extends Action if (!empty($search)) { $queries[] = Query::search('search', $search); } + + if(!$team->isEmpty()) { + $queries[] = Query::equal('teamInternalId', [$team->getSequence()]); + } $cursor = Query::getCursorQueries($queries, false); $cursor = \reset($cursor); From b625bdb189772ff2c75f4b0708f5fb8dd7729ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 11 Feb 2026 17:25:44 +0100 Subject: [PATCH 2/2] Formatting fix --- .../Platform/Modules/Projects/Http/Projects/XList.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php b/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php index 03e35388f7..8e420e87f2 100644 --- a/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php +++ b/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php @@ -9,7 +9,6 @@ use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Projects; -use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filters\ListSelection; use Utopia\Config\Config; @@ -85,8 +84,8 @@ class XList extends Action if (!empty($search)) { $queries[] = Query::search('search', $search); } - - if(!$team->isEmpty()) { + + if (!$team->isEmpty()) { $queries[] = Query::equal('teamInternalId', [$team->getSequence()]); }