由于自定义字段,史诗创作失败
Epic creation fails due to custom fields
我正在使用 Excel-VBA 并尝试创建具有两个自定义字段(Epic-Name 和预算)的史诗,但不知何故它不起作用。创建没有自定义字段的任务工作正常。
这是 VBA(但我不认为
真的有问题
Public Function CreateEpic(ByVal summary As String, ByVal description As String, ByVal project As String, ByVal budget As String, ByVal dueDate As String) As String
Dim issueType As String
issueType = "Epic"
Dim text As String
text = "{""fields"": {""project"":{ ""key"": """ & project & """},""summary"": """ & summary & """,""description"": """ & description & """,""issuetype"": {""name"": """ & issueType & """},""customfield_12335"":""" & budget & """, ""duedate"":""" & dueDate & """,""customfield_12932"":""" & summary & """}}"
Dim resp As Object
Set resp = HttpRequest("POST", "/rest/api/latest/issue", text, True, True)
MsgBox (text)
CreateEpic = resp("key")
End Function
这是 JSON(消息框的输出)
{
"fields":
{
"project":{
"key": "PROJTEST"
},
"summary": "testepic1",
"description": "testepic01",
"issuetype": {
"name": "Epic"
},
"customfield_12335":"100h",
"duedate":"2020-11-1",
"customfield_12932":"testepic1"
}
}
错误响应告诉我这两个自定义字段存在问题,但我不明白这一点。
已解决。代码有效,只是纯粹的愚蠢(自定义字段的错误 ID)
我正在使用 Excel-VBA 并尝试创建具有两个自定义字段(Epic-Name 和预算)的史诗,但不知何故它不起作用。创建没有自定义字段的任务工作正常。 这是 VBA(但我不认为
真的有问题Public Function CreateEpic(ByVal summary As String, ByVal description As String, ByVal project As String, ByVal budget As String, ByVal dueDate As String) As String
Dim issueType As String
issueType = "Epic"
Dim text As String
text = "{""fields"": {""project"":{ ""key"": """ & project & """},""summary"": """ & summary & """,""description"": """ & description & """,""issuetype"": {""name"": """ & issueType & """},""customfield_12335"":""" & budget & """, ""duedate"":""" & dueDate & """,""customfield_12932"":""" & summary & """}}"
Dim resp As Object
Set resp = HttpRequest("POST", "/rest/api/latest/issue", text, True, True)
MsgBox (text)
CreateEpic = resp("key")
End Function
这是 JSON(消息框的输出)
{
"fields":
{
"project":{
"key": "PROJTEST"
},
"summary": "testepic1",
"description": "testepic01",
"issuetype": {
"name": "Epic"
},
"customfield_12335":"100h",
"duedate":"2020-11-1",
"customfield_12932":"testepic1"
}
}
错误响应告诉我这两个自定义字段存在问题,但我不明白这一点。
已解决。代码有效,只是纯粹的愚蠢(自定义字段的错误 ID)