Uh oh!
There was an error while loading. Please reload this page.
clone stacks - #1777
Conversation
jakobroehrl
commented
Apr 30, 2020
@juliushaertl |
Please have a look at #1832 before you make exact clones of the cards @jakobroehrl (Not sure if this affects this issue, sorry for spam if not) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| $newStack = new Stack(); | ||
| $newStack->setTitle($stack->getTitle() . ' (' . $this->l10n->t('copy') . ')'); | ||
| $newStack->setBoardId($boardId); | ||
| $newStack->setOrder($stack->getOrder() +1); |
There was a problem hiding this comment.
Ideally we get the number of stacks in total for the board and move it to the end.
There was a problem hiding this comment.
OK. This way I'll get the corresponding board:
$board = $this->boardMapper->find($boardId);
How can I get the stack number of this board?
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ee0d103 to
7c00309Compare0dd38f5 to
1dce89eCompareThere was a problem hiding this comment.
No need for that, you should be able to just remove the whole insert method and it will use the parent one then.
This comment has been minimized.
This comment has been minimized.
jakobroehrl
commented
Jun 18, 2020
Works great! |
Uh oh!
There was an error while loading. Please reload this page.
| $newStack = new Stack(); | ||
| $newStack->setTitle($stack->getTitle() . ' (' . $this->l10n->t('copy') . ')'); | ||
| $newStack->setBoardId($boardId); | ||
| $newStack->setOrder($stack->getOrder() +1); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| * @return array|Entity | ||
| */ | ||
| public function find($cardId) { | ||
| $sql = 'SELECT * from `*PREFIX*deck_assigned_labels` where `card_id` = ?'; |
There was a problem hiding this comment.
Could be switched to QBMapper right away to get rid of the deprecated DeckMapper. See https://docs.nextcloud.com/server/18/developer_manual/app/storage/database.html?highlight=querybuilder#mappers for an example
There was a problem hiding this comment.
Feel free to do that in a follow up, but it would be good to not introduce new code that uses legacy functions right away 😉
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
juliusknorr
commented
Sep 8, 2020
Tests fail 😉 |
4a23abb to
2a8841fCompareSigned-off-by: Jakob Röhrl <jakob.roehrl@web.de>
2a8841f to
24f83b8CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
doodhout
commented
May 23, 2022
There was no reason given why this was never merged and then closed. Is it possible to pick this up again, by the original committer or by someone else? |
agautheron
commented
Nov 8, 2024
Is it possible to pick this up again, by the original committer or by someone else? |
Signed-off-by: Jakob Röhrl jakob.roehrl@web.de
Todo / to clarify
https://github.com/nextcloud/deck/blob/0dd38f5f2e067ef78aa7dbf3cfc8cb61c6d2d6ca/lib/Service/StackService.php#L451-L455