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

Serialization of CustomFields with the "people" resourceSubtype is impossible #2

Open
OliverAbdulrahim opened this issue Oct 28, 2022 · 0 comments

Comments

@OliverAbdulrahim
Copy link
Owner

Issue outlined

Summary
No field in CustomField captures the people_value property given by custom field api endpoints. Example:

Example request

curl -X GET https://app.asana.com/api/1.0/tasks/12345?opt_fields=custom_fields
    ... header stuff ...

Example response

{
  "data": {
    "gid": "12345",
    "custom_fields": [
      {
        "gid": "...",
        "resource_subtype": "people",
        "resource_type": "custom_field",
        "people_value": [
          {
            "gid": "...",
            "resource_type": "user"
          },
          {
            "gid": "...",
            "resource_type": "user"
          }
        ],
        "type": "people"
      }
    ]
  }
}

Relevant part of the response

        "people_value": [
          {
            "gid": "...",
            "resource_type": "user"
          },
          {
            "gid": "...",
            "resource_type": "user"
          }
        ]
  • people_value is an array of User resources.

Proposed solution

Changes to CustomField class (Java)
Must implement a field to serialize the people_value object within CustomField.

@SerializedName("people_value")
public Collection<User> peopleValue;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant