#1893906: Move views argument date handlers from node module changed the date argument handlers from node_created_* to date_* however, when these got changed the created_year_month got changed to date_year_month, which is wrong. This needs to stay as created (like all the others) but use the date_year_month plugin.

Files: 
CommentFileSizeAuthor
#28 1960888-28.patch3.37 KBjibran
PASSED: [[SimpleTest]]: [MySQL] 55,425 pass(es).
[ View ]
#28 interdiff.txt1021 bytesjibran
#26 1960888-26.patch3.09 KBjibran
PASSED: [[SimpleTest]]: [MySQL] 55,528 pass(es).
[ View ]
#25 1960888-25.patch3.09 KBjibran
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]
#25 interdiff.txt728 bytesjibran
#22 drupal-1960888-18.patch2.97 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 55,459 pass(es).
[ View ]
#22 interdiff.txt582 bytesdawehner
#19 1960888-19.patch3.09 KBjibran
PASSED: [[SimpleTest]]: [MySQL] 57,635 pass(es).
[ View ]
#19 interdiff.txt755 bytesjibran
#18 1960888-18.patch3.09 KBjibran
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]
#18 interdiff.txt858 bytesjibran
#10 1960888-10.patch2.95 KBjibran
FAILED: [[SimpleTest]]: [MySQL] 55,340 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#6 drupal-1960888-6.patch2.93 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 55,858 pass(es).
[ View ]
#6 interdiff.txt1.98 KBdawehner
#3 vdc-1960888-3-FAIL.patch2.05 KBtim.plunkett
FAILED: [[SimpleTest]]: [MySQL] 54,735 pass(es), 1 fail(s), and 8 exception(s).
[ View ]
#3 vdc-1960888-3-PASS.patch3.01 KBtim.plunkett
PASSED: [[SimpleTest]]: [MySQL] 54,765 pass(es).
[ View ]
d8.node-created.patch980 bytesdamiankloip
PASSED: [[SimpleTest]]: [MySQL] 53,906 pass(es).
[ View ]

Comments

Makes sense. Test?

Assigned:Unassigned» tim.plunkett
Status:Needs review» Needs work
Issue tags:+Needs tests

Status:Needs work» Needs review
Issue tags:-Needs tests
StatusFileSize
new3.01 KB
PASSED: [[SimpleTest]]: [MySQL] 54,765 pass(es).
[ View ]
new2.05 KB
FAILED: [[SimpleTest]]: [MySQL] 54,735 pass(es), 1 fail(s), and 8 exception(s).
[ View ]

Here's a test.

+++ b/core/modules/views/lib/Drupal/views/Tests/ProvidedViewsTest.phpundefined
@@ -0,0 +1,68 @@
+class ProvidedViewsTest extends ViewTestBase {

This seems a bit confusing with the DefaultViewsTest(s) couldn't testArchiveView just move into Drupal\views\Tests\DefaultViewsTest?

+++ b/core/modules/views/lib/Drupal/views/Tests/ProvidedViewsTest.phpundefined
@@ -0,0 +1,68 @@
+    $column_map = array('nid' => 'nid', 'created_year_month' => 'created_year_month', 'num_records' => 'num_records');

I don't think we do anywhere else, but maybe drupal_map_assoc() instead? Not sure if there is any point though - Just would make it slightly easier to read imo.

Assigned:tim.plunkett» Unassigned

StatusFileSize
new1.98 KB
new2.93 KB
PASSED: [[SimpleTest]]: [MySQL] 55,858 pass(es).
[ View ]

Let's do that.

This looks good now. Let's wait for the bot.

Status:Needs review» Reviewed & tested by the community

Status:Reviewed & tested by the community» Needs work

Needs reroll

curl https://drupal.org/files/drupal-1960888-6.patch | git a
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3003  100  3003    0     0  33492      0 --:--:-- --:--:-- --:--:-- 39000
error: patch failed: core/modules/node/node.views.inc:270
error: core/modules/node/node.views.inc: patch does not apply

StatusFileSize
new2.95 KB
FAILED: [[SimpleTest]]: [MySQL] 55,340 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Fixed this

++<<<<<<< HEAD
+  $data['node_field_data']['date_year_month'] = array(
++=======
+   $data['node']['created_year_month'] = array(
++>>>>>>> 6

with this
-   $data['node_field_data']['date_year_month'] = array(
-  $data['node']['created_year_month'] = array(
++  $data['node_field_data']['created_year_month'] = array(

Status:Needs work» Needs review

Status:Needs review» Reviewed & tested by the community

+1

Status:Reviewed & tested by the community» Fixed

Committed to 8.x. Thanks.

Status:Fixed» Needs work

This unfortunately broke head...

Fail      Other      DefaultViewsTest.  209 Drupal\views\Tests\DefaultViewsTest
    Identical result set.

Reverted with commit 6801679 and pushed to 8.x.

Status:Needs work» Needs review
Issue tags:-VDC

#10: 1960888-10.patch queued for re-testing.

Status:Needs review» Needs work
Issue tags:+VDC

The last submitted patch, 1960888-10.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new858 bytes
new3.09 KB
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]

Fixed the test.

StatusFileSize
new755 bytes
new3.09 KB
PASSED: [[SimpleTest]]: [MySQL] 57,635 pass(es).
[ View ]

Full stop missing. :/

This change looks good. let's get confirmation from the bot. Then I think this can be RTBC again.

Status:Needs review» Reviewed & tested by the community

Came back green, thanks for fixing that @jibran!

Status:Reviewed & tested by the community» Needs review
StatusFileSize
new582 bytes
new2.97 KB
PASSED: [[SimpleTest]]: [MySQL] 55,459 pass(es).
[ View ]

Oh wow ... this code would have passed in the last month but then started to fail.

Status:Needs review» Reviewed & tested by the community

Ignore my patch as it is pretty much the same fix, not even better.

Status:Reviewed & tested by the community» Needs work

Re #19

+++ b/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php
@@ -160,4 +160,55 @@ function createTerm($vocabulary) {
+    // Create time of additional nodes created in the setup method.
+    $created_year_month = date('Yd', time() - 3600);

This should be 'Ym', but in general, why use time() instead of a fixed timestamp also in the setup method?

Status:Needs work» Needs review
StatusFileSize
new728 bytes
new3.09 KB
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]
new201.33 KB
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]

Fixed #24.

StatusFileSize
new3.09 KB
PASSED: [[SimpleTest]]: [MySQL] 55,528 pass(es).
[ View ]

Ignore last patch wrong rebase.

+++ b/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.phpundefined
@@ -160,4 +160,55 @@ function createTerm($vocabulary) {
+    $created_year_month = date('Ym', time() - 3600);

So yeah let's use REQUEST_TIME for consistency as it also fixes some random fails.

StatusFileSize
new1021 bytes
new3.37 KB
PASSED: [[SimpleTest]]: [MySQL] 55,425 pass(es).
[ View ]

Let's do it.

Status:Needs review» Reviewed & tested by the community

That's a good idea, and great work jibran!

Status:Reviewed & tested by the community» Fixed

Committed aba632c and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.