LBAPI에서 직접 개체를 수화 할 수 없습니다. 그러나 나는 Nick이 제안한 것과 유사한 방법을 사용하여이를 수행하기 위해 도우미 클래스에서 작업하고 있습니다.
https://github.com/ConnerReeves/RallyHelpers/blob/master/RecordHydrator/RecordHydrator.js
다음은 사용 방법의 예입니다. 모든 리프 사용자 스토리 (반복 할당이있는)를 수집 한 다음 해당 이니셔티브 필드를 수화합니다.
launch: function() {
var self = this;
Ext.create('Rally.data.lookback.SnapshotStore', {
limit : Infinity,
fetch : ['Name','Iteration'],
filters : [{
property : '__At',
value : 'current'
},{
property : '_TypeHierarchy',
value : 'HierarchicalRequirement'
},{
property : 'Iteration',
operator : '!=',
value : null
},{
property : 'Children',
value : null
}]
}).load({
params : {
compress : true,
removeUnauthorizedSnapshots : true
},
callback : function(records, operation, success) {
self._hydrateRecords(records);
}
});
},
_hydrateRecords: function(records) {
Ext.create('CustomApp.RecordHydrator', {
fields: [{
name : 'Iteration',
hydrate : ['Name','StartDate','EndDate']
}]
}).hydrate(records).then({
success: function(hydratedRecords) {
console.log(_.groupBy(hydratedRecords, function(record) {
return record.get('Iteration') && record.get('Iteration').get('Name');
}));
}
});
}
-------------------기능은 사용자 스토리가 참조하는 전체 개체입니다 (Feature 속성을 통해). 이 쿼리와 유사한 코드 :
https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/111/artifact/snapshot/query.js?find={"_TypeHierarchy":"HierarchicalRequirement"}&fields=["Name","ScheduleState","PlanEstimate","Feature"]&hydrate=["ScheduleState"]
다음과 같이 반환됩니다.
{
Feature: 12483739639,
Name: "my story",
ScheduleState: "Defined",
PlanEstimate: 3
}
여기서 12483739639는 지형지 물의 ObjectID입니다. 수화물에 "특징"을 추가해도 차이는 없습니다.
전체 기능 개체 또는 일부 속성을 얻으려면 코드에서 기능의 OID를 사용하고 별도의 쿼리를 실행할 수 있습니다. 해당 OID를 배열로 푸시 $in
하고 두 번째 쿼리에서 연산자를 사용할 수도 있습니다.
출처
https://stackoverflow.com/questions/22049944