Compare commits
12 Commits
backport/6
...
backport/6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c846880a1e | ||
|
|
acaaccda05 | ||
|
|
67b378fda5 | ||
|
|
827b7da7c2 | ||
|
|
e01149cd81 | ||
|
|
4b594be8f0 | ||
|
|
b570dd8880 | ||
|
|
afc92908fd | ||
|
|
58bc1a87b1 | ||
|
|
dbbd57e443 | ||
|
|
0d42750d19 | ||
|
|
c56170f76f |
@@ -20,7 +20,7 @@
|
||||
- 🚀 Get your project organized
|
||||
|
||||
</description>
|
||||
<version>1.14.0-beta.1</version>
|
||||
<version>1.14.0-beta.2</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Julius Härtl</author>
|
||||
<documentation>
|
||||
|
||||
8
composer.lock
generated
8
composer.lock
generated
@@ -444,12 +444,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nextcloud-deps/ocp.git",
|
||||
"reference": "2a005250064759f206aa1b5a1ee000dcd808ef5b"
|
||||
"reference": "65bc71ed71b10f60394e3a3165f27e78e6b087cb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/2a005250064759f206aa1b5a1ee000dcd808ef5b",
|
||||
"reference": "2a005250064759f206aa1b5a1ee000dcd808ef5b",
|
||||
"url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/65bc71ed71b10f60394e3a3165f27e78e6b087cb",
|
||||
"reference": "65bc71ed71b10f60394e3a3165f27e78e6b087cb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -480,7 +480,7 @@
|
||||
"issues": "https://github.com/nextcloud-deps/ocp/issues",
|
||||
"source": "https://github.com/nextcloud-deps/ocp/tree/stable30"
|
||||
},
|
||||
"time": "2024-08-14T08:51:38+00:00"
|
||||
"time": "2024-08-31T00:39:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
|
||||
@@ -34,9 +34,14 @@ OC.L10N.register(
|
||||
"Later" : "Después",
|
||||
"copy" : "copiar",
|
||||
"Done" : "Hecho",
|
||||
"The file was uploaded" : "El archivo ha sido subido",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "El archivo cargado excede el valor establecido en la directiva upload_max_filesize en el archivo php.ini",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "El archivo subido sobrepasa el valor MAX_FILE_SIZE especificada en el formulario HTML",
|
||||
"The file was only partially uploaded" : "El archivo sólo fue cargado parcialmente",
|
||||
"No file was uploaded" : "No se subió ningún archivo ",
|
||||
"Missing a temporary folder" : "Falta un directorio temporal",
|
||||
"Could not write file to disk" : "No se pudo escribir el archivo en el disco",
|
||||
"A PHP extension stopped the file upload" : "Una extensión de PHP detuvo la carga del archivo",
|
||||
"Card not found" : "Tarjeta no encontrada",
|
||||
"Invalid date, date format must be YYYY-MM-DD" : "La fecha es inválida, favor de seguir el formato AAAA-MM-DD",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in Markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 📎 Attach files and embed them in your Markdown description\n- 💬 Discuss with your team using comments\n- ⚡ Keep track of changes in the activity stream\n- 🚀 Get your project organized" : "Deck es una herramienta de organización de estilo kanban dirigida a la planificación personal y la organización de proyectos para equipos integrados con Nextcloud.\n\n\n- 📥 Agrega tus tareas a las tarjetas y ordénalas.\n- 📄 Escriba notas adicionales\n- 🔖 Asignar etiquetas para una organización mejor\n- 👥 Comparte con tu equipo, amigos o familia.\n- 📎 Adjuntar archivos e incrustarlos en su descripción\n- 💬 Discuta con su equipo usando comentarios.\n- ⚡ Mantenga un registro de los cambios en el flujo de actividad\n- 🚀 Organiza tu proyecto",
|
||||
|
||||
@@ -32,9 +32,14 @@
|
||||
"Later" : "Después",
|
||||
"copy" : "copiar",
|
||||
"Done" : "Hecho",
|
||||
"The file was uploaded" : "El archivo ha sido subido",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "El archivo cargado excede el valor establecido en la directiva upload_max_filesize en el archivo php.ini",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "El archivo subido sobrepasa el valor MAX_FILE_SIZE especificada en el formulario HTML",
|
||||
"The file was only partially uploaded" : "El archivo sólo fue cargado parcialmente",
|
||||
"No file was uploaded" : "No se subió ningún archivo ",
|
||||
"Missing a temporary folder" : "Falta un directorio temporal",
|
||||
"Could not write file to disk" : "No se pudo escribir el archivo en el disco",
|
||||
"A PHP extension stopped the file upload" : "Una extensión de PHP detuvo la carga del archivo",
|
||||
"Card not found" : "Tarjeta no encontrada",
|
||||
"Invalid date, date format must be YYYY-MM-DD" : "La fecha es inválida, favor de seguir el formato AAAA-MM-DD",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in Markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 📎 Attach files and embed them in your Markdown description\n- 💬 Discuss with your team using comments\n- ⚡ Keep track of changes in the activity stream\n- 🚀 Get your project organized" : "Deck es una herramienta de organización de estilo kanban dirigida a la planificación personal y la organización de proyectos para equipos integrados con Nextcloud.\n\n\n- 📥 Agrega tus tareas a las tarjetas y ordénalas.\n- 📄 Escriba notas adicionales\n- 🔖 Asignar etiquetas para una organización mejor\n- 👥 Comparte con tu equipo, amigos o familia.\n- 📎 Adjuntar archivos e incrustarlos en su descripción\n- 💬 Discuta con su equipo usando comentarios.\n- ⚡ Mantenga un registro de los cambios en el flujo de actividad\n- 🚀 Organiza tu proyecto",
|
||||
|
||||
@@ -40,6 +40,7 @@ class CardService {
|
||||
private StackMapper $stackMapper;
|
||||
private BoardMapper $boardMapper;
|
||||
private LabelMapper $labelMapper;
|
||||
private LabelService $labelService;
|
||||
private PermissionService $permissionService;
|
||||
private BoardService $boardService;
|
||||
private NotificationHelper $notificationHelper;
|
||||
@@ -61,6 +62,7 @@ class CardService {
|
||||
StackMapper $stackMapper,
|
||||
BoardMapper $boardMapper,
|
||||
LabelMapper $labelMapper,
|
||||
LabelService $labelService,
|
||||
PermissionService $permissionService,
|
||||
BoardService $boardService,
|
||||
NotificationHelper $notificationHelper,
|
||||
@@ -81,6 +83,7 @@ class CardService {
|
||||
$this->stackMapper = $stackMapper;
|
||||
$this->boardMapper = $boardMapper;
|
||||
$this->labelMapper = $labelMapper;
|
||||
$this->labelService = $labelService;
|
||||
$this->permissionService = $permissionService;
|
||||
$this->boardService = $boardService;
|
||||
$this->notificationHelper = $notificationHelper;
|
||||
@@ -349,8 +352,34 @@ class CardService {
|
||||
}
|
||||
$card->setDescription($description);
|
||||
|
||||
|
||||
// @var Card $card
|
||||
$card = $this->cardMapper->update($card);
|
||||
$oldBoardId = $this->stackMapper->findBoardId($changes->getBefore()->getStackId());
|
||||
$boardId = $this->cardMapper->findBoardId($card->getId());
|
||||
if($boardId !== $oldBoardId) {
|
||||
$stack = $this->stackMapper->find($card->getStackId());
|
||||
$board = $this->boardService->find($this->cardMapper->findBoardId($card->getId()));
|
||||
$boardLabels = $board->getLabels() ?? [];
|
||||
foreach($card->getLabels() as $cardLabel) {
|
||||
$this->removeLabel($card->getId(), $cardLabel->getId());
|
||||
$label = $this->labelMapper->find($cardLabel->getId());
|
||||
$filteredLabels = array_values(array_filter($boardLabels, fn ($item) => $item->getTitle() === $label->getTitle()));
|
||||
// clone labels that are assigned to card but don't exist in new board
|
||||
if (empty($filteredLabels)) {
|
||||
if ($this->permissionService->getPermissions($boardId)[Acl::PERMISSION_MANAGE] === true) {
|
||||
$newLabel = $this->labelService->create($label->getTitle(), $label->getColor(), $board->getId());
|
||||
$boardLabels[] = $label;
|
||||
$this->assignLabel($card->getId(), $newLabel->getId());
|
||||
}
|
||||
} else {
|
||||
$this->assignLabel($card->getId(), $filteredLabels[0]->getId());
|
||||
}
|
||||
}
|
||||
$board->setLabels($boardLabels);
|
||||
$this->boardMapper->update($board);
|
||||
$this->changeHelper->boardChanged($board->getId());
|
||||
}
|
||||
|
||||
if ($resetDuedateNotification) {
|
||||
$this->notificationHelper->markDuedateAsRead($card);
|
||||
}
|
||||
|
||||
@@ -125,8 +125,10 @@ class DeckJsonService extends ABoardImportService {
|
||||
foreach ($this->tmpCards as $sourceCard) {
|
||||
foreach ($sourceCard->labels as $label) {
|
||||
$cardId = $this->cards[$sourceCard->id]->getId();
|
||||
$labelId = $this->labels[$label->id]->getId();
|
||||
$cardsLabels[$cardId][] = $labelId;
|
||||
if ($this->getImportService()->getData()->id === $label->boardId) {
|
||||
$labelId = $this->labels[$label->id]->getId();
|
||||
$cardsLabels[$cardId][] = $labelId;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $cardsLabels;
|
||||
|
||||
42
package-lock.json
generated
42
package-lock.json
generated
@@ -1994,9 +1994,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@bundle-stats/plugin-webpack-validate": {
|
||||
"version": "4.14.0",
|
||||
"resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-validate/-/plugin-webpack-validate-4.14.0.tgz",
|
||||
"integrity": "sha512-VLXk50dAriPXM4i1HfH3rX6rKXKqnU7EKI/xkUaRfGgSCiMWsLfNpA/T+gv3CYYXM/HqCM2tXOy3dc9V5OIh8w==",
|
||||
"version": "4.15.0",
|
||||
"resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-validate/-/plugin-webpack-validate-4.15.0.tgz",
|
||||
"integrity": "sha512-AKj6okcTFgQMFnJg3rSrLDw4dQ2U9I0WGecKf4qzeW3MsoSgnTW58ZBCebIoODEatw7bhawBlXhkl6tvjkjY4A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lodash": "4.17.21",
|
||||
@@ -3895,9 +3895,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@nextcloud/vue": {
|
||||
"version": "8.17.0",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-8.17.0.tgz",
|
||||
"integrity": "sha512-BylZZlJcGiEfBO9k/TE8iuKEzzSfmxek1fFwU2fpo0xUDxH9qQurMdTli3ix/kgXaBJgwBD8H8hjzYirpAYbXg==",
|
||||
"version": "8.17.1",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-8.17.1.tgz",
|
||||
"integrity": "sha512-DC7nI04pp69vS5VxMDhpwPFhb5TWvyJgtmFciAx6j8RFrTPutdjNfOxOCncGaNXOlodaIpg/6EYV8YHU9DR9ng==",
|
||||
"dependencies": {
|
||||
"@floating-ui/dom": "^1.1.0",
|
||||
"@linusborg/vue-simple-portal": "^0.1.5",
|
||||
@@ -4180,14 +4180,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@relative-ci/agent": {
|
||||
"version": "4.2.10",
|
||||
"resolved": "https://registry.npmjs.org/@relative-ci/agent/-/agent-4.2.10.tgz",
|
||||
"integrity": "sha512-w3aMOrSEyrL6s8i69o6Jjo58WYMz51cI3MuCuoQDKJANew08lXpaQEBI6cyf/gQrVH/ixy9MQhOcESKUqwexEQ==",
|
||||
"version": "4.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@relative-ci/agent/-/agent-4.2.11.tgz",
|
||||
"integrity": "sha512-EnX0yiSWUkHUnuWzvmysqJJk44EsSmCD7TuXGMgJ9EGxHkAFdEg/+d3+r0UHdThSJ1tDKX6C0h9S4DoOIl8BSQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@bundle-stats/plugin-webpack-filter": "4.14.0",
|
||||
"@bundle-stats/plugin-webpack-validate": "4.14.0",
|
||||
"core-js": "3.38.0",
|
||||
"@bundle-stats/plugin-webpack-filter": "4.15.0",
|
||||
"@bundle-stats/plugin-webpack-validate": "4.15.0",
|
||||
"core-js": "3.38.1",
|
||||
"cosmiconfig": "9.0.0",
|
||||
"debug": "4.3.6",
|
||||
"dotenv": "16.4.5",
|
||||
@@ -4213,9 +4213,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@relative-ci/agent/node_modules/@bundle-stats/plugin-webpack-filter": {
|
||||
"version": "4.14.0",
|
||||
"resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-filter/-/plugin-webpack-filter-4.14.0.tgz",
|
||||
"integrity": "sha512-/p8kMPHyFNcmpgQIOIFkSYObQQUf5F5Gbzsy+dgH+QXSGEppyI1m5Os4BJEBzqS8jUewwzcKVDIQCg2pWoKNAw==",
|
||||
"version": "4.15.0",
|
||||
"resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-filter/-/plugin-webpack-filter-4.15.0.tgz",
|
||||
"integrity": "sha512-DQIFkcAkH4VjrDiaoe02c7n5ShGYHIdSMihwDAvRk/4x4PQ1v0/W1kyPxs71glj+6iSddumqNIE28G0DQ4mTQA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 14.0"
|
||||
@@ -4225,9 +4225,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@relative-ci/agent/node_modules/core-js": {
|
||||
"version": "3.38.0",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.38.0.tgz",
|
||||
"integrity": "sha512-XPpwqEodRljce9KswjZShh95qJ1URisBeKCjUdq27YdenkslVe7OO0ZJhlYXAChW7OhXaRLl8AAba7IBfoIHug==",
|
||||
"version": "3.38.1",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.38.1.tgz",
|
||||
"integrity": "sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"funding": {
|
||||
@@ -7731,9 +7731,9 @@
|
||||
"integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="
|
||||
},
|
||||
"node_modules/cypress": {
|
||||
"version": "13.13.3",
|
||||
"resolved": "https://registry.npmjs.org/cypress/-/cypress-13.13.3.tgz",
|
||||
"integrity": "sha512-hUxPrdbJXhUOTzuML+y9Av7CKoYznbD83pt8g3klgpioEha0emfx4WNIuVRx0C76r0xV2MIwAW9WYiXfVJYFQw==",
|
||||
"version": "13.14.1",
|
||||
"resolved": "https://registry.npmjs.org/cypress/-/cypress-13.14.1.tgz",
|
||||
"integrity": "sha512-Wo+byPmjps66hACEH5udhXINEiN3qS3jWNGRzJOjrRJF3D0+YrcP2LVB1T7oYaVQM/S+eanqEvBWYc8cf7Vcbg==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "deck",
|
||||
"description": "",
|
||||
"version": "1.14.0-beta.1",
|
||||
"version": "1.14.0-beta.2",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Julius Härtl",
|
||||
@@ -107,4 +107,4 @@
|
||||
"<rootDir>/node_modules/jest-serializer-vue"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,6 +68,8 @@ class CardServiceTest extends TestCase {
|
||||
private $boardService;
|
||||
/** @var LabelMapper|MockObject */
|
||||
private $labelMapper;
|
||||
/** @var LabelService|MockObject */
|
||||
private $labelService;
|
||||
private $boardMapper;
|
||||
/** @var AttachmentService|MockObject */
|
||||
private $attachmentService;
|
||||
@@ -96,6 +98,7 @@ class CardServiceTest extends TestCase {
|
||||
$this->stackMapper = $this->createMock(StackMapper::class);
|
||||
$this->boardMapper = $this->createMock(BoardMapper::class);
|
||||
$this->labelMapper = $this->createMock(LabelMapper::class);
|
||||
$this->labelService = $this->createMock(LabelService::class);
|
||||
$this->permissionService = $this->createMock(PermissionService::class);
|
||||
$this->boardService = $this->createMock(BoardService::class);
|
||||
$this->notificationHelper = $this->createMock(NotificationHelper::class);
|
||||
@@ -118,6 +121,7 @@ class CardServiceTest extends TestCase {
|
||||
$this->stackMapper,
|
||||
$this->boardMapper,
|
||||
$this->labelMapper,
|
||||
$this->labelService,
|
||||
$this->permissionService,
|
||||
$this->boardService,
|
||||
$this->notificationHelper,
|
||||
|
||||
Reference in New Issue
Block a user