拉力赛节点将新项目添加到集合中

时间:2017-03-18 07:47:27

标签: node.js rally

使用rally-node工具包,我在尝试将新的Changeset(内联新的Change)添加到现有的Userstory时收到错误消息。当我对新的更改进行注释时,会按预期添加更改集。这似乎与我无法弄清楚的变更数据有关。

添加电话:



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

Rally API Add Tags to existing userstory NodeJS

1 个答案:

答案 0 :(得分:0)

我认为你不能同时做所有这些事情(尽管那会非常酷)。

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