首页 > 解决方案 > Redmine Rest API 错误“主题不能为空”

问题描述

我正在使用创建问题,kbsali redmine api即使我通过主题,我也收到主题不能为空白错误

$result=$client->issue->create([
    'project_id'  => 'projder',
    'subject'     => 'this is subject subject this is subject subject this is subject subject this is subject subject this is subject subject',
    'description' => 'this is subject subject this is subject subject this is subject subject this is subje',
    'assigned_to_id' => '45',
    'priority_id' => $_POST['inputPriority'],
    'uploads'     => array(
        array(
          'token'       => $upload->upload->token,
          'filename'    => $file,
          'description' => 'This is my file description',
          'content_type'=> 'image/png'
        ),
        array(
          'token'       => $uploadoptional->upload->token,
          'filename'    => $optionalUpload,
          'description' => 'Client Attachment',
          'content_type'=> $optionalUploadType
        )
    )
]);



)
SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [type] => array
        )

    [error] => Subject cannot be blank
)

标签: phpredmine-api

解决方案


我找到了解决方案,redmine 主题字段权限没有通过使用我发送 API 请求来创建票证授予用户。


推荐阅读