rally-node 将新项目添加到集合中

rally-node Add new item to collection

使用 rally-node 工具包,当我尝试向现有用户故事添加新的变更集以及内联的新变更时,我收到一条返回的错误消息。当我将新的更改注释掉时,会按预期添加更改集。这似乎是我无法弄清楚的更改数据的具体内容。

添加调用:

rallyApi.add({  
  "ref":"https://rally1.rallydev.com/slm/webservice/v2.0/hierarchicalrequirement/91834286580",
  "collection":"Changesets",
  "data":[  
    {  
      "Author":{  
        "_ref":"https://rally1.rallydev.com/slm/webservice/v2.0/user/53634054872"
      },
      "CommitTimestamp":"2017-03-17T09:52:07-04:00",
      "Message":"Feature/tags (#11)",
      "Revision":"b8460460254cb79d3e72c98172c164f5c4d3493a",
      "Uri":"https://ghe/org/repo/commit/b8460460254cb79d3e72c98172c164f5c4d3493a",
      "Changes":[
        {
          "Action":"M",
          "PathAndFilename":"file1.json",
          "Uri":"https://ghe/org/repo/commit/b8460460254cb79d3e72c98172c164f5c4d3493a/file1.json"
        },
        {
          "Action":"M",
          "PathAndFilename":"file2.json",
          "Uri":"https://ghe/org/repo/commit/b8460460254cb79d3e72c98172c164f5c4d3493a/file2.json"
        }
      ],
      "SCMRepository":{
  "_ref":"https://rally1.rallydev.com/slm/webservice/v2.0/scmrepository/101417587520"
      }
    }
  ]
})

返回错误: { [Error: Could not create artifact to collection] errors: [ 'Could not create artifact to collection', 'Cannot parse object reference from "{null: {"Action": "M", "PathAndFilename": "file1.json", "Uri": "https://ghe/org/repo/commit/b8460460254cb79d3e72c98172c164f5c4d3493a/file1.json"}}"' ] }

它似乎告诉我它试图用该数据找到现有的更改,但我想添加文档中指定的新更改和最近的问题:

https://github.com/RallyTools/rally-node/wiki/User-Guide#add-to-a-collection

我不认为你可以同时做所有这些事情(尽管那会很酷)。

我会先使用 add 方法添加您指定的变更集,但不进行任何更改。然后再次使用 add 方法在该变更集上创建变更。有用吗?