简体   繁体   English

如何使用JIRA REST Api添加评论以发布Subversion选项卡

[英]How to add comment with JIRA REST Api to issue Subversion tab

I have a problem with jira post adding. 我在添加jira帖子时遇到问题。 I'want my added comments to be in Subversion or Commits tab, but I've only managed to put in the comments section. 我希望添加的评论位于“ Subversion”或“提交”选项卡中,但我仅设法在“评论”部分中添加了评论。

If it is not possible I would like to ask how to edit the html of the certain comment 如果不可能,我想问一下如何编辑特定注释的html。

提交标签是从Subversion或Git获取数据的,因此您不能仅在其中添加注释

From the JIRA REST API documentation: 从JIRA REST API文档中:

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-addWorklog https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-addWorklog

you should be able to add entries to the "work log". 您应该能够将条目添加到“工作日志”中。

Basically (Perl-ish pseudo code): 基本上(Perl-ish伪代码):

$content = q/{ "comment": "I did some work here.", "visibility": { "type": "group", "value": "jira-developers" }, "started": "2016-09-28T15:37:31.449+0000", "timeSpentSeconds": 12000 } /; $ content = q / {“ comment”:“我在这里做了一些工作。”,“ visibility”:{“ type”:“ group”,“ value”:“ jira-developers”},“ started”:“ 2016- 09-28T15:37:31.449 + 0000“,” timeSpentSeconds“:12000} /;

$resp = httprequest(HTTP_POST, "/rest/api/2/issue/$issueID/worklog", $content); $ resp = httprequest(HTTP_POST,“ / rest / api / 2 / issue / $ issueID / worklog”,$ content);

(updated to add sample pseudo code) (已更新以添加示例伪代码)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM