Compare commits

...

9 Commits

Author SHA1 Message Date
grnd-alt
aab8c17953 copy labels when moving cards between boards
Signed-off-by: grnd-alt <salimbelakkaf@outlook.de>
2024-09-02 07:37:30 +00:00
Nextcloud bot
490fd4b042 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-09-01 00:41:44 +00:00
dependabot[bot]
65a714353e Merge pull request #6281 from nextcloud/dependabot/npm_and_yarn/stable29/cypress-13.14.1 2024-08-31 03:04:42 +00:00
dependabot[bot]
37f1155c9a Merge pull request #6282 from nextcloud/dependabot/npm_and_yarn/stable29/babel/runtime-7.25.6 2024-08-31 03:04:38 +00:00
dependabot[bot]
b2acf2d967 Chore(deps): Bump @babel/runtime from 7.25.4 to 7.25.6
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.25.4 to 7.25.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.6/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-31 01:57:09 +00:00
dependabot[bot]
c7b4699241 Chore(deps-dev): Bump cypress from 13.13.3 to 13.14.1
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.13.3 to 13.14.1.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.13.3...v13.14.1)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-31 01:56:53 +00:00
Nextcloud bot
48ee12decd Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-08-30 00:56:07 +00:00
Nextcloud bot
c066f7b148 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-08-28 00:41:46 +00:00
Julius Härtl
1761e961c3 Merge pull request #6262 from nextcloud/backport/6260/stable29 2024-08-26 13:43:53 +02:00
10 changed files with 64 additions and 15 deletions

View File

@@ -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",

View File

@@ -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",

View File

@@ -257,6 +257,7 @@ OC.L10N.register(
"Shift" : "تغییر مکان",
"Ctrl" : "Ctrl",
"Search" : "جستجو",
"Show help dialog" : "نمایش پنجرهٔ راهنما",
"Enter" : "Enter",
"Space" : "Space",
"All boards" : "همه تخته‌ها",

View File

@@ -255,6 +255,7 @@
"Shift" : "تغییر مکان",
"Ctrl" : "Ctrl",
"Search" : "جستجو",
"Show help dialog" : "نمایش پنجرهٔ راهنما",
"Enter" : "Enter",
"Space" : "Space",
"All boards" : "همه تخته‌ها",

View File

@@ -247,6 +247,7 @@ OC.L10N.register(
"Choose a date" : "Válasszon dátumot",
"Remove due date" : "Határidő eltávolítása",
"Mark as done" : "Megjelölés készként",
"Not done" : "Nincs kész",
"Unarchive card" : "Kártya archiválásának visszavonása",
"Archive card" : "Kártya archiválása",
"Select Date" : "Dátum kiválasztása",

View File

@@ -245,6 +245,7 @@
"Choose a date" : "Válasszon dátumot",
"Remove due date" : "Határidő eltávolítása",
"Mark as done" : "Megjelölés készként",
"Not done" : "Nincs kész",
"Unarchive card" : "Kártya archiválásának visszavonása",
"Archive card" : "Kártya archiválása",
"Select Date" : "Dátum kiválasztása",

View File

@@ -60,6 +60,7 @@ class CardService {
private StackMapper $stackMapper;
private BoardMapper $boardMapper;
private LabelMapper $labelMapper;
private LabelService $labelService;
private PermissionService $permissionService;
private BoardService $boardService;
private NotificationHelper $notificationHelper;
@@ -81,6 +82,7 @@ class CardService {
StackMapper $stackMapper,
BoardMapper $boardMapper,
LabelMapper $labelMapper,
LabelService $labelService,
PermissionService $permissionService,
BoardService $boardService,
NotificationHelper $notificationHelper,
@@ -101,6 +103,7 @@ class CardService {
$this->stackMapper = $stackMapper;
$this->boardMapper = $boardMapper;
$this->labelMapper = $labelMapper;
$this->labelService = $labelService;
$this->permissionService = $permissionService;
$this->boardService = $boardService;
$this->notificationHelper = $notificationHelper;
@@ -369,8 +372,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);
}

View File

@@ -129,8 +129,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;

24
package-lock.json generated
View File

@@ -1917,9 +1917,9 @@
"peer": true
},
"node_modules/@babel/runtime": {
"version": "7.25.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.4.tgz",
"integrity": "sha512-DSgLeL/FNcpXuzav5wfYvHCGvynXkJbn3Zvc3823AEe9nPwW9IK4UoCSS5yGymmQzN0pCPvivtgS6/8U2kkm1w==",
"version": "7.25.6",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz",
"integrity": "sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==",
"dependencies": {
"regenerator-runtime": "^0.14.0"
},
@@ -7910,9 +7910,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": {
@@ -23170,9 +23170,9 @@
"peer": true
},
"@babel/runtime": {
"version": "7.25.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.4.tgz",
"integrity": "sha512-DSgLeL/FNcpXuzav5wfYvHCGvynXkJbn3Zvc3823AEe9nPwW9IK4UoCSS5yGymmQzN0pCPvivtgS6/8U2kkm1w==",
"version": "7.25.6",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz",
"integrity": "sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==",
"requires": {
"regenerator-runtime": "^0.14.0"
},
@@ -27679,9 +27679,9 @@
"integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="
},
"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,
"requires": {
"@cypress/request": "^3.0.1",

View File

@@ -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,