App SDK:通过工作区/多个项目查询数据 [英] App SDK: Query data over a workspace/multiple projects

查看:27
本文介绍了App SDK:通过工作区/多个项目查询数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个报告,该报告需要从包含多个项目的工作区获取数据.创建 RallyDataSource 时,是否可以指定搜索整个工作区或多个项目?为每个项目创建一个数据源听起来并不是最好的方法.

I'm creating a report that needs to obtain data from a workspace that has several projects in it. Is there a way to specify to either search a whole workspace or multiple projects when creating the RallyDataSource? Creating a data source per project doesn't sound like the best way of going about it.

推荐答案

如果你的项目有一个共同的父级,你可以指定父级项目和 projectScopeDown true:

If your projects have one common parent you can specify the parent project and projectScopeDown true:

var rallyDataSource = new rally.sdk.data.RallyDataSource('/workspace/12345',
    '/project/23456', false, true);

否则在您的 queryConfig 中,您可以将项目设置为 null 以查询整个工作区:

Otherwise in your queryConfig you can set the project to null to query the entire workspace:

rallyDataSource.findAll({
    key: 'stories',
    project: null,
    type: 'hierarchicalrequirement',
}, callback, errorCallback);

您可以进一步将其过滤到特定项目,如下所示:

You could further filter it to specific projects like so:

rallyDataSource.findAll({
    key: 'stories',
    project: null,
    type: 'hierarchicalrequirement',
    query: '((Project = /project/23456) OR (Project = /project/34567))'
}, callback, errorCallback);

这篇关于App SDK:通过工作区/多个项目查询数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆