Querying Allowed values for the possible fields of defects Using Java Rally rest API

試著忘記壹切 提交于 2019-12-12 18:26:50

问题


I need to check if the field is having allowed values, if so need to get all the allowed values from the system using Java Rally rest API for eg : check if severity is having allowed values, if yes get the allowed values such as major problem, minor problem etc from the Rally


回答1:


You can query against the TypeDefinition type. Include Attributes and AllowedValues in your fetch.

QueryRequest defectTypeRequest = new QueryRequest("typedefinition");
defectTypeRequest.setFetch(new Fetch("Attributes,Name,AllowedValues,StringValue"));
defectTypeRequest.setQueryFilter(new QueryFilter("TypePath", "=", "defect"));
QueryResponse queryResponse = restApi.query(defectTypeRequest);

Check out the TypeDefinition, AttributeDefinition and AllowedAttributeValue object in the WSAPI docs for a full list of the available fields to be fetched on each.



来源:https://stackoverflow.com/questions/16141512/querying-allowed-values-for-the-possible-fields-of-defects-using-java-rally-rest

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!