在名为“PLACE”的自定义字段中存在一些默认值,其中包含 LONDON、PARIS 等。我如何从 C# 中的 JIRA SOAP API 检索这些(伦敦、巴黎)。JIRA-JIRA 4.0 和 C#-.net 框架 4.0。
问问题
2281 次
1 回答
0
如果您未设置 SOAP API,则可以使用XML-RPC来执行此操作。Python 代码示例(可以更改为 C#):
#!/usr/bin/python
# Refer to the XML-RPC Javadoc to see what calls are available:
# http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/xmlrpc/XmlRpcService.html
import xmlrpclib
# Jira connction info
#server = 'http://212.29.248.203:8080/rpc/xmlrpc'
server = 'https://your.jira.com/rpc/xmlrpc'
user = 'user'
password = 'password'
filter = '10302'
customfieldID = "customfield_10417"
s = xmlrpclib.ServerProxy(server)
auth = s.jira1.login(user, password)
# get list of issues
issues = s.jira1.getIssuesFromFilter(auth, filter)
for issue in issues:
# get open since time
for customFields in issue['customFieldValues']:
if customFields['customfieldId'] == customfieldID :
print "found field!"+ customFields['values']
于 2012-08-28T18:21:18.413 回答