簡體   English   中英

如何使用REST API從模板創建JIRA發行票據?

[英]How to create JIRA issue ticket from a template using REST api?

我想使用模板創建JIRA變更請求票證。 我使用JIRA API端點'/ rest / api / 2 / issue'。

以下是發送給JIRA的數據格式。

誰能幫忙嗎?

payload =
{ fields:
{ project: { key: "CRQ"},
customfield_15630: "SampleTemplateName",
summary: "Testing",
customfield_17679: "N.A" ,
customfield_14530:"2018-06-17T00:00:00.0+0000 ",
customfield_14531: "2018-06-17T00:00:00.0+0000 " } }

這是我要在發行憑單中使用的模板的XML格式。

<item>
    <title>[TMPL-167] NTW-8 [Network_Interface_configuration]</title>
    <link>https://jiraqa.com/browse/TMPL-167</link>
    <project id="15980" key="TMPL">Templates</project>
    <description>Test</description>
    <environment />
    <key id="492895">TMPL-167</key>
    <summary>NTW-8 [Network_Interface_configuration]</summary>
</item>

您肯定在那里缺少問題類型。 以下是使用REST API創建適當問題的示例: https : //docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-createIssue某些字段可能是是否需要,取決於項目設置,但是項目ID,摘要和問題類型是絕對最小值。

另一件事是您還希望使用模板。 Jira可能根本無法從那里自動獲取數據,但是如果出現任何問題,無論如何您都會收到一條錯誤消息。 您能否更詳細地描述您到底需要做什么? 提出解決方案會比較容易;)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM