Skip to content

Conversation

@theoholl
Copy link
Contributor

@theoholl theoholl commented Dec 30, 2025

Summary

The update method of the CardController now handles the optional (and nullable) done parameter. When a card is marked as done, and the card updated, the 'done' status is not cleared anymore.

Screencast.Fix.mp4

…d parameter

Signed-off-by: Theo <36564257+theoholl@users.noreply.github.com>
@theoholl theoholl changed the title Extend the update method to handle 'done' status and optional archived parameter [main] Fix: Keep 'done' status when updating archived card Jan 2, 2026
Copy link
Member

@grnd-alt grnd-alt left a comment

Choose a reason for hiding this comment

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

this change is correct in my view and approved as a fix.
But the behavior of cardService is very weird here.
The OptionalNullableValue doc states that done == null means the value has not been set and should not be updated, and done->getValue() == null means the value has been set and should be updated to be null.

Now the actual CardService behavior is to always just set the value though (as seen here: https://github.com/nextcloud/deck/blob/main/lib/Service/CardService.php#L297).
Which means when done is not included in the request it will be set to null. Which currently is not a problem, as we always seem to send it but is still very unexpected behavior in my eyes.
This change was done for the android app a while ago in this PR: #5491
But I don't really know why.
Maybe @stefan-niedermann could elaborate why this was required exactly, and if we can make done behave like all the other optional params to that function (ignore when null)

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.

The card completion mark is reset if changes were made to the completed card

2 participants