def allowed_values(type, field, workspace = nil)
      rally_workspace_object(workspace)
  
      type_def = get_typedef_for(type, workspace)
      allowed_vals = {}
      type_def["Attributes"].each do |attr|
        next if attr["ElementName"] != field
        attr["AllowedValues"].each do |val_ref|
          val = val_ref["StringValue"]
          val = "Null" if val.nil? || val.empty?
          allowed_vals[val] = true
        end
      end
      allowed_vals
    end
def allowed_values(type, field, workspace = nil)
      rally_workspace_object(workspace)
  
      type_def = get_typedef_for(type, workspace)
      allowed_vals = {}
      type_def["Attributes"].each do |attr|
        next if attr["ElementName"] != field
        attr["AllowedValues"].each do |val_ref|
          val = val_ref["StringValue"]
          val = "Null" if val.nil? || val.empty?
          allowed_vals[val] = true
        end
      end
      allowed_vals
    end
todo - check support for portfolio item fields