سؤال

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