2013-04-10 104 views
0

我需要从我的C#工具链接JIRA问题。远程JIRA问题创建

我无法使用REST API,因为我的JIRA版本是4.4,我无法升级。

+0

你到目前为止看过或尝试过什么? – 2013-04-10 14:45:20

+0

我试图用SOAP来制作它。 – 2013-04-12 14:30:57

回答

0

棘手的是,因为SOAP方法中没有addLink()方法,所以必须使用它。我使用shell脚本直接调用了URL,但您需要知道JIRA问题ID而不仅仅是问题关键字。我想,这曾与JIRA 4.4但不低于5.x

〜马特

附:在这个编辑器中的代码格式化器是可怕的!

# 
# Add links to JIRA issues 
# 
# Matt Doar 
# CustomWare 
# 
# usage: create_links.sh issue_id issue_key 
# where the issue_id is the unique id for a JIRA issue, not it's issue key. 
# You can see the issue id in the XML view of an issue. 
# and issue_key is the other issue to be linked to. 

USERNAME=admin 
PASSWORD=secret 
SERVER_URL="http://localhost:8080" 

DASHBOARD_PAGE_URL=$SERVER_URL/secure/Dashboard.jspa 
COOKIE_FILE_LOCATION=jiracoookie 

# Get the authentication cookie 
curl -u $USERNAME:$PASSWORD --cookie-jar $COOKIE_FILE_LOCATION -sS --output /dev/null $DASHBOARD_PAGE_URL 

issueid=$1 
issuekey=$2 
#echo "Linking issue: $issueid and $issuekey" 
curl --cookie $COOKIE_FILE_LOCATION --header "X-Atlassian-Token: no-check" -sS --output /dev/null -d "id=$issueid" -d "linkDesc=relates to" -d "linkKey=$issuekey" "$SERVER_URL/secure/LinkExistingIssue.jspa" 

rm -f $COOKIE_FILE_LOCATION 
+0

感谢您的帮助,我会从我的代码发送此请求。 – 2013-04-12 14:32:13

+0

我正在使用WebRequest(.NET),在标题中使用'='分隔符时出现错误。改用':'代替。 – 2013-04-18 12:48:30