0

I'm trying to update a multi value drop down list field (custom field) in Rally using python2.7 and pyral (v 1.3.2).

I can add a single value to the field like this:

>>> update_data = {'FormattedID' : 'US58848', 'c_MapProfile' : {'ObjectID' : 129751972040}}
>>> rally.post('UserStory', update_data)
<pyral.entity.HierarchicalRequirement object at 0x6fffea46c50>

This updates the field to the attribute value specified by the ObjectID. The object ID in the MapProfile dict points to the AllowedAttributeValue object.

However, I don't seem to be able to figure out, how to add multiple values to the field.

Can anybody give a hint? Or does pyral not support multi-value fields?

Thanks Thomas

1 Answers1

0

I'm not familiar with the pyral toolkit, but I can say the api expects the data in a certain shape.

'c_MapProfile':[
  {'_ref':'/allowedattributevalue/123'},
  {'_ref':'/allowedattributevalue/124'}]

I believe you can retrieve the allowed values for your custom field using the getAllowedValues function

Keep in mind this will overwrite any existing values. If you only wish to add or remove entries without overwriting the current value - use the collection endpoints as explained in the CA Agile Central Web Services API Documentation

agradl
  • 3,536
  • 2
  • 18
  • 16