>我正在尝试使用回溯API获取PortfolioItem/Feature的PreliminaryEstimateValue,但它总是为空。并且 初步估计 也不能根据错误消息进行水合 作为响应。
PreliminaryEstimateValue 不应该使用 Lookback API 正确返回吗?
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
}
}
不幸的是,看起来 PreliminaryEstimateValue 在 Lookback API 中不可用。 你必须先在工作区中查询 wsapi 中的 PreliminaryEstimate对象以获取该项目组合项类型,然后在事后在数据中交叉引用它们。