Skip to content

Custom field, include choices: missing custom field value hash. #56

@Brutalbeard

Description

@Brutalbeard

Using the gem, and the custom_field model.

res = client.custom_fields.only(265355).include('choices')

Response come back, but when doing a print of the response, the choice values don't show.

 "created_at"=>"2017-10-16T14:14:57-07:00",
 "name"=>"WFM?",
 "value_type"=>"single",
 "write_access"=>"project_admin",
 "read_access"=>"project_collaboration",
 "values_count"=>1,
 "creator_id"=>"6799077",
 "choice_ids"=>["695285", "695295"],
 "custom_field_set_id"=>"123185",
 "id"=>"265355"}

When using a custom faraday get request, the choices information will show.

pp res

Response:

  {"265355"=>
    {"updated_at"=>"2017-10-16T14:14:57-07:00",
     "created_at"=>"2017-10-16T14:14:57-07:00",
     "name"=>"WFM?",
     "value_type"=>"single",
     "write_access"=>"project_admin",
     "read_access"=>"project_collaboration",
     "values_count"=>1,
     "creator_id"=>"6799077",
     "choice_ids"=>["695285", "695295"],
     "custom_field_set_id"=>"123185",
     "id"=>"265355"}},
 "results"=>[{"key"=>"custom_fields", "id"=>"265355"}],
 "custom_field_choices"=>
  {"695285"=>
    {"updated_at"=>"2017-10-16T14:14:57-07:00",
     "created_at"=>"2017-10-16T14:14:57-07:00",
     "label"=>"Yes",
     "position"=>0,
     "custom_field_id"=>"265355",
     "id"=>"695285"},
   "695295"=>
    {"updated_at"=>"2017-10-16T14:14:57-07:00",
     "created_at"=>"2017-10-16T14:14:57-07:00",
     "label"=>"No",
     "position"=>1,
     "custom_field_id"=>"265355",
     "id"=>"695295"}}}

Think the model could be adjusted?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions