我正在尝试使用回溯API获取PortfolioItem / Feature的PreliminaryEstimateValue,但始终为空。而且PreliminaryEstimate也无法根据错误消息进行响应。
是否应使用Lookback API正确返回PreliminaryEstimateValue?
WSAPI调用可以正常工作。
请求:
{
"find": {
"_ProjectHierarchy": 90681998188,
"_TypeHierarchy": "PortfolioItem/Feature",
"Release": {"$in": [131091429492]},
"__At": "2018-03-23T00Z"
},
"fields": [ "Name", "FormattedID", "PreliminaryEstimateValue", "PreliminaryEstimate", "State"],
"hydrate" : ["State", "PreliminaryEstimate"]
}
响应:
{
"_rallyAPIMajor": "2",
"_rallyAPIMinor": "0",
"Errors": [],
"Warnings": [
"PreliminaryEstimate is not a field that can be hydrated."
],
"GeneratedQuery": {
"find": {
"_ProjectHierarchy": 90681998188,
"_TypeHierarchy": {
"$in": [
46772407280
]
},
"Release": {
"$in": [
131091429492
]
},
"$and": [
{
"_ValidFrom": {
"$lte": "2018-03-23T00:00:00.000Z"
},
"_ValidTo": {
"$gt": "2018-03-23T00:00:00.000Z"
}
}
],
"_ValidFrom": {
"$lte": "2018-06-19T20:31:00.287Z"
}
},
"limit": 100,
"skip": 0,
"fields": {
"Name": 1,
"PreliminaryEstimateValue": 1,
"PreliminaryEstimate": 1,
"State": 1,
"Project": 1,
"_UnformattedID": 1,
"_TypeHierarchy": "['$slice': -1]"
}
},
"TotalResultCount": 9,
"HasMore": false,
"StartIndex": 0,
"PageSize": 100,
"ETLDate": "2018-06-19T20:31:00.287Z",
"Results": [
{
"State": "In-Progress",
"PreliminaryEstimate": 46772407339,
"Name": "XXX",
"FormattedID": "F68452"
},
{
"Name": "XXX",
"State": "Exploring",
"PreliminaryEstimate": 46772407352,
"FormattedID": "F64513"
},
{
"Name": "XXX",
"State": "Exploring",
"PreliminaryEstimate": 46772407364,
"FormattedID": "F64765"
},
{
"Name": "XXX",
"State": "In-Progress",
"PreliminaryEstimate": 46772407352,
"FormattedID": "F54674"
},
{
"State": "Exploring",
"PreliminaryEstimate": 46772407352,
"Name": "XXX",
"FormattedID": "F67562"
},
{
"PreliminaryEstimate": 46772407339,
"Name": "XXX",
"State": "In-Progress",
"FormattedID": "F40534"
},
{
"State": "In-Progress",
"PreliminaryEstimate": 80332343408,
"Name": "XXX",
"FormattedID": "F69302"
},
{
"Name": "XXX",
"FormattedID": "F66688"
},
{
"Name": "XXX",
"State": "In-Progress",
"PreliminaryEstimate": 46772407373,
"FormattedID": "F47343"
}
],
"ThreadStats": {
"cpuTime": "16.131516",
"waitTime": "0",
"waitCount": "0",
"blockedTime": "0",
"blockedCount": "0"
},
"Timings": {
"preProcess": 0,
"findEtlDate": 86,
"allowedValuesDisambiguation": 1201,
"mongoQuery": 23,
"authorization": 3,
"formattedId": 0,
"suppressNonRequested": 0,
"compressSnapshots": 0,
"allowedValuesHydration": 307,
"TOTAL": 1620
}
}
答案 0 :(得分:0)
不幸的是,Lookback Api中似乎没有PreliminaryEstimateValue。 您只需要首先在wsapi中为该投资组合项目类型在工作区中查询PreliminaryEstimate对象,然后在事实之后交叉引用它们即可。