leantime
leantime copied to clipboard
[BUG] API Add comment exception
When calling the addComment API, it throws an exception :
ErrorException: Warning: Attempt to read property "type" on string
The bug is in : app/Domain/Comments/Services/Comments.php
https://github.com/Leantime/leantime/blob/5c4956c9e67aa2836aac1770edace33d04e6aca0/app/Domain/Comments/Services/Comments.php#L84C195-L84C197
$entity is a string, not an object, while called by API
When creating ticket comments the service method expects the entity to be a ticket object. Can you pass in the ticket as json object?
Thanks for your reply
Last week I tried to pass in the ticket as json object but it doesn't work, I got the same exception