Jira Api:为什么在创建新问题时将描述与摘要合并?

Jira Api: Why is description being merged with summary, when creating a new issue?

我正在创建一个 Powershell 脚本来监控磁盘 space 并在 Jira 上创建问题,剩余多少磁盘 space。

我似乎无法弄清楚如何将我的摘要和我的描述分开。它们被“合并”在一起,并且在创建问题时都被传递到摘要中。

我猜我的 JSON 正文格式可能不正确,但我似乎无法弄清楚我做错了什么。

我发送的正文是这样的:

$body = 
'{
    "fields":
    {
        "project":
        {
           "key": "' + $projectKey + '"
        },
        "issuetype":
        {
            "name": "' + $issueType + '"
        },
        "summary": "' + $summary + '",
        "description": "' + $description + '",
        "priority":
        {
            "id": "' + $priority + '"
        }
    }
}';

摘要和描述如下所示:

$description = "{0}% space is available on the {1} drive. {2} of {3} GB of space is available." -f [math]::truncate($diskSpace), $drive, [math]::truncate($currentDrive.FreeSpace / 1gb), [math]::truncate($currentDrive.Size / 1gb);
$summary = "There is plenty of space left on the {0} drive" -f , $drive;

问题不是 JSON,而是我调用函数的方式,它负责创建 Jira。

我是这样改的:

CreateJira($summary, $description)

为此:

CreateJira $summary, $description