Skip to content

🚀 Fetch all fields from API instead of hardcoding #67

@balasankarc

Description

@balasankarc

What problem does this solve?

The list of fields that is returned by custom report is hardcoded in the FieldCollection class.

Because of this, a custom report when passed :all will not include custom fields, but only the hardcoded ones.

Describe the solution you'd like

BambooHR returns the list of all fields via api, which is accessible using client.meta.fields method. Can we populate that while initializing a client and generate the list of fields from that information instead of hardcoding it?

Possible alternatives

Support something like client.report.custom([:all, customField1, customField2], 'JSON') which will let users specify the additional fields they like (in addition to the ones returned by :all).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions