Open
Description
On the Template Mappings screen when review items for import, no Color icon displayed for statuses:
(GatherContent - Template Mappings - and under existing template mapping click "Review Items for Import)
It happens because get_project_items method in API class (includes/classes.api.php) return items list without status field.
As quick fix I just added loop with add_status_to_item method applied to all items returned by API:
public function get_project_items( $project_id, $template_id ) {
$query_params = array(
'template_id' => $template_id,
'include' => 'status_name',
'per_page' => 500,
);
$response = $this->get(
'projects/' . $project_id . '/items',
array(
'headers' => array(
'Accept' => 'application/vnd.gathercontent.v2+json',
),
),
'',
$query_params
);
foreach ($response as $i => $item) {
$response[ $i ]->status = (object) $this->add_status_to_item( $item );
}
return $response;
}
Metadata
Assignees
Labels
No labels
Activity