[PR #819] [CLOSED] feat: duplicate tasks #971

Closed
opened 2025-11-01 21:08:18 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/819
Author: @HornedHeck
Created: 5/22/2025
Status: Closed

Base: mainHead: main


📝 Commits (7)

  • ba65328 feat: Add duplicate task button to TaskDetailView
  • ef719e7 Delete frontend/src/models/taskDuplicateModel.test.ts
  • 9e530bc Delete frontend/src/services/taskDuplicateService.test.ts
  • b1de7c8 Implement first batch of comments:
  • 7fe5237 task_duplicate.go changes:
  • a4fcab9 Delete frontend/src/services/taskDuplicateService.ts
  • f773fc2 Update tests to use existing fixtures and verify reminders copy

📊 Changes

9 files changed (+342 additions, -2 deletions)

View changed files

📝 frontend/src/i18n/lang/en.json (+2 -1)
frontend/src/modelTypes/ITaskDuplicate.ts (+8 -0)
frontend/src/models/taskDuplicateModel.ts (+14 -0)
frontend/src/services/taskDuplicate.ts (+20 -0)
📝 frontend/src/stores/tasks.ts (+20 -0)
📝 frontend/src/views/tasks/TaskDetailView.vue (+19 -1)
pkg/models/task_duplicate.go (+184 -0)
pkg/models/task_duplicate_test.go (+68 -0)
📝 pkg/routes/routes.go (+7 -0)

📄 Description

Why

I'm missing templates functionality. Since copying of task can be used as partial substitute and this feature does not need a lot of efforts, I decided to implement it.

Feature requirements

  1. As a user I want to create copies of task to simplify common flows.
    • Basic information about the task should be copied: title, description, progress, time constraints.
    • Related sub-tasks should be copied with all related fields and added as a sub-task to the duplicate.
    • Since this feature is positioned as a substitute for templates, do NOT add Copied To or Copied From relations to any of the tasks to avoid unneeded relations.
    • Do not copy fields that may harm UX: subscription, favorite status, reminders.
    • Do not copy attachments and comments, investigate later, if it is possible to link them.
  2. As a user I want to open newly create task to make appropriate changes.
    • New task should be opened in the same style (modal or not modal) as the original task.
    • Navigation back from the new task should NOT return to the original task but to the entry before it (e.g. to the Kanban board).

Changes summary

  1. Added duplicate task button to TaskDetailView.vue. This buttons creates a partial deep copy of the task that includes information about title, description, status, priority, time constrains, assignees, repeats, labels, project, sub-tasks. After process finished, details view for the new task is opened.
  2. Added translations to accommodate UI changes.

Screenshots

image

P.S.

I am not very experienced with Vue and TypeScript, so feel free to propose related improvements and suggestions.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/819 **Author:** [@HornedHeck](https://github.com/HornedHeck) **Created:** 5/22/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (7) - [`ba65328`](https://github.com/go-vikunja/vikunja/commit/ba653284e9540dd4c079e9f06709f6d1654d5241) feat: Add duplicate task button to TaskDetailView - [`ef719e7`](https://github.com/go-vikunja/vikunja/commit/ef719e7e5332a81b19d12d8f7ae4102d91993704) Delete frontend/src/models/taskDuplicateModel.test.ts - [`9e530bc`](https://github.com/go-vikunja/vikunja/commit/9e530bc6c174be1414b42b95d45b557d4724693c) Delete frontend/src/services/taskDuplicateService.test.ts - [`b1de7c8`](https://github.com/go-vikunja/vikunja/commit/b1de7c87d0172a1e82633d728472c0037faea707) Implement first batch of comments: - [`7fe5237`](https://github.com/go-vikunja/vikunja/commit/7fe5237d62d25f6dee48fd08112f1be4be22772a) task_duplicate.go changes: - [`a4fcab9`](https://github.com/go-vikunja/vikunja/commit/a4fcab9909cd6963dccca5634b1176c90f7e5d1e) Delete frontend/src/services/taskDuplicateService.ts - [`f773fc2`](https://github.com/go-vikunja/vikunja/commit/f773fc20e86e9408fa99a628dcfd473186e4ef52) Update tests to use existing fixtures and verify reminders copy ### 📊 Changes **9 files changed** (+342 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/i18n/lang/en.json` (+2 -1) ➕ `frontend/src/modelTypes/ITaskDuplicate.ts` (+8 -0) ➕ `frontend/src/models/taskDuplicateModel.ts` (+14 -0) ➕ `frontend/src/services/taskDuplicate.ts` (+20 -0) 📝 `frontend/src/stores/tasks.ts` (+20 -0) 📝 `frontend/src/views/tasks/TaskDetailView.vue` (+19 -1) ➕ `pkg/models/task_duplicate.go` (+184 -0) ➕ `pkg/models/task_duplicate_test.go` (+68 -0) 📝 `pkg/routes/routes.go` (+7 -0) </details> ### 📄 Description ### Why I'm missing templates functionality. Since copying of task can be used as partial substitute and this feature does not need a lot of efforts, I decided to implement it. ### Feature requirements 1. As a user I want to create copies of task to simplify common flows. - Basic information about the task should be copied: title, description, progress, time constraints. - Related sub-tasks should be copied with all related fields and added as a sub-task to the duplicate. - Since this feature is positioned as a substitute for templates, do NOT add `Copied To` or `Copied From` relations to any of the tasks to avoid unneeded relations. - Do not copy fields that may harm UX: subscription, favorite status, reminders. - Do not copy attachments and comments, investigate later, if it is possible to link them. 2. As a user I want to open newly create task to make appropriate changes. - New task should be opened in the same style (modal or not modal) as the original task. - Navigation back from the new task should NOT return to the original task but to the entry before it (e.g. to the Kanban board). ### Changes summary 1. Added duplicate task button to TaskDetailView.vue. This buttons creates a partial deep copy of the task that includes information about title, description, status, priority, time constrains, assignees, repeats, labels, project, sub-tasks. After process finished, details view for the new task is opened. 2. Added translations to accommodate UI changes. ### Screenshots ![image](https://github.com/user-attachments/assets/6d38911d-bd1a-42c8-b17a-fbb4f2af402d) ### P.S. I am not very experienced with Vue and TypeScript, so feel free to propose related improvements and suggestions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-01 21:08:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#971