拉力赛中的深度复制功能 [英] Feature deep copy in rally

查看:52
本文介绍了拉力赛中的深度复制功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上我想要像特征深度复制这样的功能这将复制该功能中这些故事中的所有故事和任务.我修改了 StoryDe​​epCopy 中的代码,但功能没有得到填充,只是故事才得到填充,我不知道为什么会发生这种情况.我认为故事深拷贝应用程序是在 1.32 版中,它没有功能或任何 PortfolioItem 的概念,但 2.0 版对此提供了支持.这可能是原因.有什么建议么这是应用程序的一些代码

Actully I want functionality like feature deep copy Which will copy all the stories and tasks inside those stories in that feature. I modified the code from StoryDeepCopy but features are not getting populated just stories are only getting populated, I don't know why its happening. I think the story deep copy app was in version 1.32 which don't have concept of feature or any PortfolioItem but 2.0 version has the support for that. This may be the reaason. Any suggestions This is some of the code from the app

  function onChooserClose(chooser, args) {
    if (args.selectedItem) {
      selectedValue = args.selectedItem;
      goButton.setEnabled(true);
      dojo.byId('featureBox').innerHTML = args.selectedItem.FormattedID + ' - ' + args.selectedItem.Name;
    }
  }

  function showChooser() {
    var chooserConfig = {
      fetch:"FormattedID,Name,Description",
      title: 'Feature Chooser'
    };
    chooser = new rally.sdk.ui.Chooser(chooserConfig, dataSource);
    chooser.addEventListener('onClose', onChooserClose);
    chooser.display();
  }

  rally.addOnLoad(function () {
    goButton = new rally.sdk.ui.basic.Button({
      text: "Copy",
      enabled: false
    });
    goButton.addEventListener('onClick', buttonPressed);
    goButton.display('goButton');

    chooseButton = new rally.sdk.ui.basic.Button({
      text: "Choose"
    });
    chooseButton.addEventListener('onClick', showChooser);
    chooseButton.display('chooseButton');

    showChooser();

    rally.sdk.ui.AppHeader.setHelpTopic("252");
  });
});

推荐答案

对于应用程序目录中的功能,没有等效的深拷贝.您是正确的,最新版本是 1.33 的 AppSDK1 没有 PortfolioItem 对象的概念.如果您想访问投资组合项目或阻止原因,或在 WS API 1.43 以下版本中引入的任何其他功能,此语法将允许:

There is no equivalent of deep copy for features in the app catalog. You are correct that AppSDK1, latest version of which is 1.33 has no concept of PortfolioItem objects. If you want to access Portfolio Items or Blocked Reason, or any other feature introduced in later versions of WS API up to 1.43 this syntax will allow it:

<script type="text/javascript" src="/apps/1.33/sdk.js?apiVersion=1.43"></script>

下面的代码片段显示了此技巧的另一个变体,该应用程序在 AppSDK1 应用程序中构建了 PortfolioItems 表:

Another variation of this trick is shown in a code fragment below from an app that builds a table of PortfolioItems in AppSDK1 app:

<script type="text/javascript" src="https://rally1.rallydev.com/apps/1.32/sdk.js"></script>
   <script type="text/javascript">

     function tableExample() {
       var rallyDataSource = new rally.sdk.data.RallyDataSource('111','222','false','false');
       rallyDataSource.setApiVersion("1.43");
      function itemQuery() {
         var queryObject = {
           key: "pi",
           type: "portfolioitem",
           fetch: "FormattedID,Name"
         };
         rallyDataSource.findAll(queryObject, populateTable);
      }

此方法不适用于 WS API v2.0.

This method does not work with v2.0 of WS API.

必须谨慎使用.肯定会打破的一件事是围绕时间框开始和结束日期的计算.这就是为什么许多旧版 Rally 应用程序目录应用程序仍为 1.29 的原因.这是由于 API 版本 1.30 中的更改.请参阅 WS API 文档中的API 版本控制部分.

It has to be used with caution. One thing that definitely will break is around calculations of timebox start and end dates. That's why many legacy Rally App Catalog apps are still at 1.29. This is due to changes in API Version 1.30. See API versioning section in the WS API documentation.

这篇关于拉力赛中的深度复制功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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