Task::addComment ignores uid parameter

Created on 12 June 2025, 22 days ago

Problem/Motivation

The task method is defined as follows:

  public function addComment(string $comment, $uid) {
    $commentStorage = $this->entityTypeManager()->getStorage('kanban_comment');
    $comment = $commentStorage->create([
      'task' => $this->id(),
      'uid' => 2,
      'comment' => [
        'value' => $comment,
        'format' => 'minikanban_markdown',
      ],
    ])->save();
    return $comment;
  }

Note that the $uid parameter is required, but is unused. The uid is always hard-coded to 2.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom jeremyskinner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024