Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Brutalbeard opened this issue Nov 1, 2017 · 0 comments
Open

Comments

@Brutalbeard
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant