In the Views handler for "State" field:
$data['workbench_moderation_node_history']['state'] = array(
'title' => t('State'),
'help' => t('Content moderation state of the node revisision.'),
'filter' => array(
'handler' => 'workbench_moderation_handler_filter_state',
),
'field' => array(
'handler' => 'workbench_moderation_handler_field_state',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
'argument' => array(
'handler' => 'views_handler_argument_string',
'name table' => 'workbench_moderation_states',
'name field' => 'label',
),
);
It uses the workbench_moderation_handler_field_state field handler which just allows ouputting of the label of instead of the machine name of the state.
The from state doesn't do this so it only shows the machine name
$data['workbench_moderation_node_history']['from_state'] = array(
'title' => t('From state'),
'help' => t('Previous content moderation state of the node revisision.'),
'filter' => array(
'handler' => 'workbench_moderation_handler_filter_state',
),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
'argument' => array(
'handler' => 'views_handler_argument_string',
'name table' => 'workbench_moderation_states',
'name field' => 'label',
),
);
I am making a View where it is more important for me to show the From State in list
I will attach a patch that fixes this.
Comments
Comment #1
tedbowPatch attached
Comment #2
tedbowChanging to needs review
Comment #3
iTiZZiMO commentedWe also need this so maybe it could be implemented soon?