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.