Skip to content
Snippets Groups Projects
Commit 187a3c54 authored by catch's avatar catch
Browse files

Issue #2689655 by cafuego: D8 Comment date views arguments uses incorrect database column

parent f9595403
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -127,3 +127,10 @@ function comment_update_8001() { ...@@ -127,3 +127,10 @@ function comment_update_8001() {
/** /**
* @} End of "addtogroup updates-8.0.0-rc". * @} End of "addtogroup updates-8.0.0-rc".
*/ */
/**
* Clear caches to fix Comment Views context filter.
*/
function comment_update_8002() {
// Empty update to cause a cache flush.
}
...@@ -40,11 +40,65 @@ public function getViewsData() { ...@@ -40,11 +40,65 @@ public function getViewsData() {
$data['comment_field_data']['created']['title'] = $this->t('Post date'); $data['comment_field_data']['created']['title'] = $this->t('Post date');
$data['comment_field_data']['created']['help'] = $this->t('Date and time of when the comment was created.'); $data['comment_field_data']['created']['help'] = $this->t('Date and time of when the comment was created.');
$data['comment_field_data']['created_fulldata'] = array(
'title' => $this->t('Created date'),
'help' => $this->t('Date in the form of CCYYMMDD.'),
'argument' => array(
'field' => 'created',
'id' => 'date_fulldate',
),
);
$data['comment_field_data']['created_year_month'] = array(
'title' => $this->t('Created year + month'),
'help' => $this->t('Date in the form of YYYYMM.'),
'argument' => array(
'field' => 'created',
'id' => 'date_year_month',
),
);
$data['comment_field_data']['created_year'] = array(
'title' => $this->t('Created year'),
'help' => $this->t('Date in the form of YYYY.'),
'argument' => array(
'field' => 'created',
'id' => 'date_year',
),
);
$data['comment_field_data']['created_month'] = array(
'title' => $this->t('Created month'),
'help' => $this->t('Date in the form of MM (01 - 12).'),
'argument' => array(
'field' => 'created',
'id' => 'date_month',
),
);
$data['comment_field_data']['created_day'] = array(
'title' => $this->t('Created day'),
'help' => $this->t('Date in the form of DD (01 - 31).'),
'argument' => array(
'field' => 'created',
'id' => 'date_day',
),
);
$data['comment_field_data']['created_week'] = array(
'title' => $this->t('Created week'),
'help' => $this->t('Date in the form of WW (01 - 53).'),
'argument' => array(
'field' => 'created',
'id' => 'date_week',
),
);
$data['comment_field_data']['changed']['title'] = $this->t('Updated date'); $data['comment_field_data']['changed']['title'] = $this->t('Updated date');
$data['comment_field_data']['changed']['help'] = $this->t('Date and time of when the comment was last updated.'); $data['comment_field_data']['changed']['help'] = $this->t('Date and time of when the comment was last updated.');
$data['comment_field_data']['changed_fulldata'] = array( $data['comment_field_data']['changed_fulldata'] = array(
'title' => $this->t('Created date'), 'title' => $this->t('Changed date'),
'help' => $this->t('Date in the form of CCYYMMDD.'), 'help' => $this->t('Date in the form of CCYYMMDD.'),
'argument' => array( 'argument' => array(
'field' => 'changed', 'field' => 'changed',
...@@ -53,7 +107,7 @@ public function getViewsData() { ...@@ -53,7 +107,7 @@ public function getViewsData() {
); );
$data['comment_field_data']['changed_year_month'] = array( $data['comment_field_data']['changed_year_month'] = array(
'title' => $this->t('Created year + month'), 'title' => $this->t('Changed year + month'),
'help' => $this->t('Date in the form of YYYYMM.'), 'help' => $this->t('Date in the form of YYYYMM.'),
'argument' => array( 'argument' => array(
'field' => 'changed', 'field' => 'changed',
...@@ -62,7 +116,7 @@ public function getViewsData() { ...@@ -62,7 +116,7 @@ public function getViewsData() {
); );
$data['comment_field_data']['changed_year'] = array( $data['comment_field_data']['changed_year'] = array(
'title' => $this->t('Created year'), 'title' => $this->t('Changed year'),
'help' => $this->t('Date in the form of YYYY.'), 'help' => $this->t('Date in the form of YYYY.'),
'argument' => array( 'argument' => array(
'field' => 'changed', 'field' => 'changed',
...@@ -71,7 +125,7 @@ public function getViewsData() { ...@@ -71,7 +125,7 @@ public function getViewsData() {
); );
$data['comment_field_data']['changed_month'] = array( $data['comment_field_data']['changed_month'] = array(
'title' => $this->t('Created month'), 'title' => $this->t('Changed month'),
'help' => $this->t('Date in the form of MM (01 - 12).'), 'help' => $this->t('Date in the form of MM (01 - 12).'),
'argument' => array( 'argument' => array(
'field' => 'changed', 'field' => 'changed',
...@@ -80,7 +134,7 @@ public function getViewsData() { ...@@ -80,7 +134,7 @@ public function getViewsData() {
); );
$data['comment_field_data']['changed_day'] = array( $data['comment_field_data']['changed_day'] = array(
'title' => $this->t('Created day'), 'title' => $this->t('Changed day'),
'help' => $this->t('Date in the form of DD (01 - 31).'), 'help' => $this->t('Date in the form of DD (01 - 31).'),
'argument' => array( 'argument' => array(
'field' => 'changed', 'field' => 'changed',
...@@ -89,7 +143,7 @@ public function getViewsData() { ...@@ -89,7 +143,7 @@ public function getViewsData() {
); );
$data['comment_field_data']['changed_week'] = array( $data['comment_field_data']['changed_week'] = array(
'title' => $this->t('Created week'), 'title' => $this->t('Changed week'),
'help' => $this->t('Date in the form of WW (01 - 53).'), 'help' => $this->t('Date in the form of WW (01 - 53).'),
'argument' => array( 'argument' => array(
'field' => 'changed', 'field' => 'changed',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment