MicroFocus / alm-octane-js-rest-sdk

NodeJS wrapper for the Micro Focus ALM Octane API
Other
9 stars 14 forks source link

Add support for expanding reference fields #43

Closed XtraSonic closed 1 year ago

XtraSonic commented 3 years ago

Previously requests which included the "fields" query parameter were made with .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/defects?fields=author,release,phase,priority,team. Octane used to return more information about reference fields, but this functionality was changed. Now it only returns enough information to identify the reference field without additional information. Octane also added a way to query extra fields for reference fields using the following format .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/defects?fields=author{name},release,phase{name},priority,team and we also need to support this feature in the sdk

silviucanton99 commented 1 year ago

This can be done by directly specifying the extended fields in the fields method as comma-separated strings: await octane.get(Octane.entityTypes.defects).fields('name', 'owner', 'phase{name}').execute()