Can somebody give me an example of how to add a tag to a defect using the Rally App SDK (in Javascript)?

Updating simple fields are straightforward, but I'm not clear how to attach list of objects to other objects (e.g. tags to defects).

Thanks...

有帮助吗?

解决方案

Any object in Rally can be uniquely identified by its _ref property. So if you want to set the tags on a defect you can simply do so like this:

rallyDataSource.update({"_ref":
    "https://rally1.rallydev.com/slm/webservice/1.26/defect/12345.js",  //defect to update
    "Tags": [
        {
            _ref: "/tag/23456.js" //ref of tag 1
        }, 
        {
            _ref: "/tag/34567.js"  //ref of tag 2
        }
    ]}, 
    onUpdateComplete, onError);  //success, error callbacks
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top