Skip to content

fix: Preserve card description/due date on cloning - #7345

Open
juliusknorr wants to merge 4 commits into
mainfrom
fix/clone-description
Open

juliusknorr wants to merge 4 commits into
mainfrom
fix/clone-description

Conversation

@juliusknorr

@juliusknorr juliusknorr commented Nov 7, 2025 •

Copy link
Copy Markdown
Member
  • fix: Pass getUpdatedFields to internal card entity
  • fix: Set description and due date on create
  • fix: Keep the start date on card clone

The first commit fixes the wrapped CardDetails entity: we proxied getters and setters to the internal card object but not getUpdatedFields, so changes made through a CardDetails instance were not detected as updates.

The second commit sets the description and due date directly when creating the cloned card. The description was meanwhile also fixed on main by refetching the card before the update (51afd22), but the due and start dates were still lost on clone.

Rebased onto main (keeps the cloned card color) and added regression tests for both.

@juliusknorr juliusknorr changed the title fix: Preserve card description/due date on cloning' --sig fix: Preserve card description/due date on cloning Nov 7, 2025
Comment thread lib/Service/CardService.php Outdated
}
$this->permissionService->checkPermission($this->stackMapper, $targetStackId, Acl::PERMISSION_EDIT);
$newCard = $this->create($originCard->getTitle(), $targetStackId, $originCard->getType(), $originCard->getOrder(), $originCard->getOwner());
$newCard = $this->create($originCard->getTitle(), $targetStackId, $originCard->getType(), $originCard->getOrder(), $originCard->getOwner(), $originCard->getDescription(), $originCard->getD());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getDuedate() should be used instead of getD()

@juliusknorr
juliusknorr force-pushed the fix/clone-description branch from 18d0e5f to 57ff2e3 Compare January 28, 2026 20:05
@juliusknorr
juliusknorr force-pushed the fix/clone-description branch from 57ff2e3 to 78679d7 Compare March 17, 2026 12:13
Signed-off-by: Julius Knorr <jus@bitgrid.net>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Julius Knorr <jus@bitgrid.net>
Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Julius Knorr <jus@bitgrid.net>
@juliusknorr
juliusknorr force-pushed the fix/clone-description branch from 78679d7 to 78af9a7 Compare November 11, 2026 14:10
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Julius Knorr <jus@bitgrid.net>
@juliusknorr

Copy link
Copy Markdown
Member Author

getDuedate() is used, the due date is now passed to create() so the clone keeps it, and the start date too.
Rebased onto main and added regression tests for description, due date and start date on clone (plus one for the getUpdatedFields forwarding).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants