Repeating tasks in kanban views should be moved to the default bucket when done
Description
So I have a saved filter that contains a bunch of tasks from different projects and has a relatively typical Kanban layout with an "In progress" & "Done" column (amongst others).
Now when moving a repeating task to "In progress" and doing ctrl-click when it's done, it doesn't make much sense to keep it in the In Progress column, instead I think it should go back into the default bucket.
I started writing a patch that actually does that, however I still fail to tell the frontend that the bucket has changed (I don't really understand how BucketID is set to the correct bucket ID - that one's different depending on which view you're using, right), so perhaps there's a patch ready soonish. Would you be interested in such a patch?
Vikunja Version
0.24.4
Browser and version
No response
Can you reproduce the bug on the Vikunja demo site?
Please select
Screenshots
No response
Would love a patch.
The update for ctrl-click is done here:
https://github.com/go-vikunja/vikunja/blob/main/frontend/src/components/tasks/partials/KanbanCard.vue#L157-L171
which then triggers this function in the store:
https://github.com/go-vikunja/vikunja/blob/main/frontend/src/stores/kanban.ts#L152-L176
That checks where to move the bucket. The api has the same logic and would need an update accordingly:
https://github.com/go-vikunja/vikunja/blob/main/pkg/models/tasks.go#L993
Oh btw speaking of which: does the frontend build work for you currently? I tried to do it in a devenv-shell and it fails like this:
❯ Projects/vikunja/frontend main* → pnpm run build
> [email protected] build /home/ma27/Projects/vikunja/frontend
> vite build && workbox copyLibraries dist/
Building "legacy" build with "@vitejs/plugin-legacy"
plugin-legacy overrode 'build.target'. You should pass 'targets' as an option to this plugin with the list of legacy browsers to support instead.
vite v5.4.10 building for production...
transforming (10) src/router/index.tsnode:events:497
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:161:15)
at writeGeneric (node:internal/stream_base_commons:152:3)
at Socket._writeGeneric (node:net:954:11)
at Socket._write (node:net:966:8)
at writeOrBuffer (node:internal/streams/writable:570:12)
at _write (node:internal/streams/writable:499:10)
at Writable.write (node:internal/streams/writable:508:10)
at AsyncCompiler.writeStdin (/home/ma27/Projects/vikunja/frontend/node_modules/.pnpm/[email protected]/node_modules/sass-embedded/dist/lib/src/compiler/async.js:30:28)
at PacketTransformer.writeInboundBuffer (/home/ma27/Projects/vikunja/frontend/node_modules/.pnpm/[email protected]/node_modules/sass-embedded/dist/lib/src/compiler/async.js:112:18)
at PacketTransformer.writeInboundProtobuf (/home/ma27/Projects/vikunja/frontend/node_modules/.pnpm/[email protected]/node_modules/sass-embedded/dist/lib/src/packet-transformer.js:66:18)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
Node.js v20.17.0
ELIFECYCLE Command failed with exit code 1.
Can also reproduce this issue when updating the pkgs.vikunja derivation from nixpkgs to latest master. I guess I'll try to undo the sass-embedded change temporarily.
Nope, I have the same issue. Works in CI, maybe this is a problem with devenv. Dev watcher seem to work fine though (with pnpm dev).
It's not devenv-related, but a problem you'll always have with Nix:
[ma27@snens:~/Projects/vikunja/frontend]$ /home/ma27/Projects/vikunja/frontend/node_modules/.pnpm/[email protected]/node_modules/sass-embedded-linux-x64/dart-sass/src/dart
Could not start dynamically linked executable: /home/ma27/Projects/vikunja/frontend/node_modules/.pnpm/[email protected]/node_modules/sass-embedded-linux-x64/dart-sass/src/dart
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
strace ftw, the error message didn't really help.
Huh I thought this was statically linked
Btw I fixed it like this in the Nix expression for vikunja, feel free to copy when the next release comes and the package in nixpkgs requires an update:
diff --git a/pkgs/by-name/vi/vikunja/package.nix b/pkgs/by-name/vi/vikunja/package.nix
index 150b1abc8fb9..152238b62a16 100644
--- a/pkgs/by-name/vi/vikunja/package.nix
+++ b/pkgs/by-name/vi/vikunja/package.nix
@@ -28,6 +28,7 @@ let
doCheck = true;
postBuild = ''
+ find node_modules/.pnpm/sass-embedded-linux-*/node_modules/sass-embedded-linux-*/dart-sass/src -name dart -print0 | xargs -I {} -0 patchelf --set-interpreter "$(<$NIX_CC/nix-support/dynamic-linker)" {}
pnpm run build
'';
First iteration available as PR in gitea: https://kolaente.dev/vikunja/vikunja/pulls/2841 Still needs some polishing, but I'd like to get some feedback first.