Skip to content

Card creation via OCS API (Talk "Create card") fails to persist assignee due to InvalidValueException in activity notification #8116

Description

@paradeiser

Bug description
When creating a Deck card from within Nextcloud Talk (using the "Create deck card" action), the card is created with the correct title, list and due date, but the assigned user does not appear on the card afterwards. The assignment is silently lost.
The server log reveals that card creation via the OCS API triggers an InvalidValueException when Deck tries to send the activity notification for the assignment. The card and assignment write partially succeed, but the notification step throws, leaving the assignee not properly set.
This does not happen when creating/assigning cards through the regular Deck web UI, which uses CardController instead of CardOcsController.

Steps to reproduce

In a Talk conversation, use the "Create deck card" action on a message (ellipsis menu)
Select a board and list
Assign a user and set a due date
Confirm creation
Open the card in Deck

Expected behavior
The card is created with the assigned user persisted and visible on the card.
Actual behavior
Title, list and due date are set correctly, but the assigned user is not shown on the card. The assignment is lost.

Server log (relevant excerpt)

Error activity: OCP\Notification\InvalidValueException: Value provided for subject is not valid at lib/private/Notification/Notification.php line 157
0. NotificationGenerator.php line 57 OC\Notification\Notification->setSubject()

  1. NotificationGenerator.php line 130 OCA\Activity\NotificationGenerator->getNotificationForEvent()
    ...
  2. ActivityManager.php line 245 OCA\Deck\Activity\ActivityManager->sendToUsers()
  3. CardService.php line 209 OCA\Deck\Activity\ActivityManager->triggerEvent()
  4. CardOcsController.php line 51 OCA\Deck\Service\CardService->create()
  5. Dispatcher.php line 165 OCA\Deck\Controller\CardOcsController->create()
    ...
    ocs/v2.php
    A related InvalidValueException for richSubject occurs on CardService->delete() via CardOcsController as well.

Server configuration

Nextcloud version: 34.0.1
Deck version: 1.18.2
Talk (spreed) version: 24.0.1
PHP version: 8.3
Database: MySQL 8.0
OS: Ubuntu 24.04

Additional findings

The issue is independent of user type and target user:

It also occurs when assigning the card to myself (not only when assigning another user).
It also occurs with a local (non-LDAP) admin account assigning the card to itself.

So the failure happens regardless of whether the assignee is LDAP-backed or local, and regardless of whether it's a self-assignment or assignment to another user. This points to the OCS code path (CardOcsController → activity notification) itself rather than any user-specific resolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions