sdk - Rally 2.1 SDK 过滤器故事功能
问题描述
我正在尝试过滤给定功能 ID 的用户故事,如下面的代码所示,但我没有得到任何结果。我已经尝试过 Feature.FormattdID 和 Feature.ObjectID ,但它没有获取该功能下的所有故事。使用功能 ID 过滤的正确方法应该是什么?
<!DOCTYPE html>
<html>
<head>
<title>Custom Store Grid Example</title>
<script type="text/javascript" src="/apps/2.1/sdk.js"></script>
<script type="text/javascript">
Rally.onReady(function() {
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
var filters = [
{property:'Feature.FormattedID',operator:'=',value: 'F1234'},
];
Ext.create('Rally.data.WsapiDataStore',{
autoLoad: true,
model:'UserStory',
filters:filters,
listeners: {
load: function(store,records,operation) {
console.log('load store', store, records, operation);
}
}
});
},
});
Rally.launchApp('CustomApp', {
name: 'Custom Store Grid Example'
});
});
</script>
<style type="text/css">
</style>
</head>
<body></body>
</html>
解决方案
这一切在我看来都是正确的。我的猜测是,您的隐式项目范围导致您的应用程序仅加载当前项目范围内的功能子项。如果您将上下文配置添加到您的商店以涵盖整个工作区,我敢打赌它会起作用:
context: {
workspace: this.getContext().getWorkspaceRef(),
project: null
}
推荐阅读
- python - 为什么在 django-admin 后端中没有使用 django-markdown 显示 markdown 小部件?
- python - 将完全密集的数组转换为稀疏矩阵是否会丢失任何信息?
- angular - 如何在 Angular 8 的另一个组件中显示表单提交?
- reactjs - 棱镜预览未在盖茨比中显示更新的内容
- gcc - pkg-config:需要问题:ld 找不到文件
- c# - 如何在引导模式中绑定 ViewComponent
- python - 如何使注册页面只接受一个电子邮件地址
- xml - 与 XPath 一起使用时,如何在 xmlstarlet 更新命令中正确添加 xml 命名空间
- here-api - HERE Map Tile Labels 仅在某些缩放级别使用指定语言?
- c# - 如何在 C# 中限制下载 HTML 文档字符串的大小?