Card creation via OCS API (Talk "Create card") fails to persist assignee due to InvalidValueException in activity notification
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
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()
- NotificationGenerator.php line 130 OCA\Activity\NotificationGenerator->getNotificationForEvent()
... - ActivityManager.php line 245 OCA\Deck\Activity\ActivityManager->sendToUsers()
- CardService.php line 209 OCA\Deck\Activity\ActivityManager->triggerEvent()
- CardOcsController.php line 51 OCA\Deck\Service\CardService->create()
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CardOcsController.php and CardService.php, then follow the activity notification path shown through ActivityManager.php and NotificationGenerator.php. Reproduce card creation through the Talk “Create deck card” OCS action and trace the InvalidValueException; done means the assignee remains persisted and visible without the notification failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100