2014-01-29 16 views

回答

0

需要這種價值觀您可以使用名稱屬性類型定義對象的查詢:

https://rally1.rallydev.com/slm/webservice/v2.0/typedefinition?query=(Name = Defect) 

將參考返回類型定義:如果你使用的類型定義的對象ID,你可能會得到屬性集合

_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/typedefinition/12352608495 

現在:

https://rally1.rallydev.com/slm/webservice/v2.0/TypeDefinition/12352608495/Attributes 

使用「缺陷」,而不是的對象ID缺陷類型def將不起作用。

現在您可以獲取缺陷TypeDefinition的屬性定義。下面是從響應的摘錄,涉及國家屬性:

{ 
     "_rallyAPIMajor": "2", 
     "_rallyAPIMinor": "0", 
     "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/attributedefinition/-12507", 
     "_objectVersion": "1", 
     "_refObjectName": "State", 
     "CreationDate": "2006-02-11T12:29:05.000Z", 
     "_CreatedAt": "Feb 11, 2006", 
     "ObjectID": -12507, 
     "Subscription": {...}, 
     "Workspace": null, 
     "AllowedQueryOperators": {...}, 
     "AllowedValueType": null, 
     "AllowedValues": { 
      "_rallyAPIMajor": "2", 
      "_rallyAPIMinor": "0", 
      "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/AttributeDefinition/-12507/AllowedValues", 
      "_type": "AllowedAttributeValue", 
      "Count": 4 
     }, 
     "AttributeType": "RATING", 
     "Constrained": true, 
     "Custom": false, 
     "ElementName": "State", 
     "Filterable": true, 
     "Hidden": false, 
     "MaxFractionalDigits": -1, 
     "MaxLength": 128, 
     "Name": "State", 
     "Note": "State of the defect", 
     "Owned": true, 
     "ReadOnly": false, 
     "Required": true, 
     "SystemRequired": true, 
     "Type": "string", 
     "VisibleOnlyToAdmins": false, 
     "_type": "AttributeDefinition" 
     } 

你可以得到國家的詳細屬性使用此URL可以從上面的響應:

https://rally1.rallydev.com/slm/webservice/v2.0/AttributeDefinition/-12507/AllowedValues 

屬性終點返回屬性如果未指定工作空間,則爲默認工作空間定義和允許的值。 「workspace」參數可以覆蓋默認的工作空間。

這裏是AppSDK2越來越ALLOWEDVALUES爲「ScheduleState」的例子:

model.getField('ScheduleState').getAllowedValueStore().load({ 
           callback: function(records, operation, success) { 
            Ext.Array.each(records, function(allowedValue) { 
            console.log(allowedValue.get('StringValue')); 
            }); 

您可能會看到構建基於對分辨率字段允許值在this post網格的應用程序的一個完整的例子。

欲瞭解更多詳情,請參閱Rally.domain.WsapiField

0

但是,當我做了我得到了響應,其中一些的ElementName的缺少像優先級,嚴重程度等,在此任何解決方案同樣的事情。

相關問題