C# 如何找到项目中存在的任务?
在, 我的项目编号为PRJ0012345。但是如何找到与此项目关联的任务/用户故事 我尝试了以下服务C# 如何找到项目中存在的任务?,c#,.net,tfs,servicenow,C#,.net,Tfs,Servicenow,在, 我的项目编号为PRJ0012345。但是如何找到与此项目关联的任务/用户故事 我尝试了以下服务 https://xyz.service-now.com/pm_project.do?WSDL 对于数据检索,我使用了以下SOAP urlhttps://xyz.service-now.com/pm_project.do?displayvalue=true&SOAP 代码: 从recordResults,我无法找到与此项目相关的相关任务/用户故事 注意:如果还使用了任何其他服务url,请在此处提
https://xyz.service-now.com/pm_project.do?WSDL
对于数据检索,我使用了以下SOAP url
https://xyz.service-now.com/pm_project.do?displayvalue=true&SOAP
代码:
从recordResults
,我无法找到与此项目相关的相关任务/用户故事
注意:如果还使用了任何其他服务url,请在此处提及。我将尝试找出相关的用户故事/任务
上述服务url使用pm_项目
表。同样,如果该url中还使用了另一个表名,请提及。谢谢。在ServiceNow中要使用ServiceNow的SOAP Web服务检索与项目相关的项目任务,您需要对项目任务表发出请求(getRecords),查询父项目是您感兴趣的项目的项目任务(在您的例子中为PRJ0012345)
这是因为在ServiceNow中,项目记录(pm_project)不引用项目任务(pm_project_task),因此项目不知道与之关联的项目任务,而是每个项目任务都通过项目任务记录上的“父”字段引用了与之相关的项目
例如,PRJ0012345,其中PRJTASK0010002是一个子项,通过其父字段与PRJ0012345相关
PRJ0012345
PRJTASK0010002 (parent=PRJ0012345)
PRJTASK0010003 (parent=PRJ0012345)
PRJTASK0010004 (parent=PRJ0012345)
PRJTASK0010005 (parent=PRJ0012345)
下面是一个示例soap请求消息体,它向pm_project_任务soap Web服务发出请求并传递查询,以便结果集仅包含其父级为PRJ0010001的pm项目任务
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pm="http://www.service-now.com/pm_project_task">
<soapenv:Header/>
<soapenv:Body>
<pm:getRecords>
<__encoded_query>parentSTARTSWITHPRJ0010001</__encoded_query>
</pm:getRecords>
</soapenv:Body>
</soapenv:Envelope>
希望有帮助 该URL用于检索web服务的WSDL,而不是用于执行任何操作或检索数据的调用。也许您应该查看该公司关于如何使用其web服务的文档和SDK。也许一个关于从C#调用WCF的web服务的教程对于数据检索也会很有用,我使用了以下SOAP urlhttps://xyz.service-now.com/pm_project.do?displayvalue=true&SOAP
有人能指导我解决这个问题吗?这与TFS有什么关系?
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pm="http://www.service-now.com/pm_project_task">
<soapenv:Header/>
<soapenv:Body>
<pm:getRecords>
<__encoded_query>parentSTARTSWITHPRJ0010001</__encoded_query>
</pm:getRecords>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pm="http://www.service-now.com/pm_project_task">
<soapenv:Header/>
<soapenv:Body>
<pm:getRecords>
<__encoded_query>parent=91668b5e0ff842003a2d47bce1050e61</__encoded_query>
</pm:getRecords>
</soapenv:Body>
</soapenv:Envelope>
var objRecord = new ServiceNowPMProjectService.getRecords
{
__encoded_query = "parentSTARTSWITHPRJ0012345"
};