Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jamesdixon created an issue. See original summary.

sivaramakrishnan’s picture

Status: Active » Needs review
FileSize
2.29 KB
85.28 KB
50.42 KB
56.98 KB

Please Apply the Here attached Patch and this patch for port the Time to Date Plugin from D7 to D8.

ericgsmith’s picture

Status: Needs review » Needs work

Thanks @sivaramakrishnan - this one will also need a test before we can commit.

vijay.mayilsamy’s picture

Hi @ericgsmith,

Here is the updated patch includes the test for time to date plugin, schema updates and fixes on the plugin code.

Thanks
Vijay

vijay.mayilsamy’s picture

jamesdixon’s picture

Status: Needs work » Needs review

Moving to needs review.

ericgsmith’s picture

Status: Needs review » Needs work

Thanks Vijay - few minor comments.

  1. +++ b/src/Plugin/Tamper/TimeToDate.php
    @@ -0,0 +1,72 @@
    +      $form_state->setErrorByName(self::SETTING_DATE_FORMAT, $this->t('Please enter a valid date format string.'));
    

    Setting the form to required would make this redundant.

  2. +++ b/src/Plugin/Tamper/TimeToDate.php
    @@ -0,0 +1,72 @@
    +    return date($this->getSetting(self::SETTING_DATE_FORMAT), $data);
    

    Would be good to throw an exception if data is not numeric first.

  3. +++ b/tests/src/Unit/Plugin/Tamper/TimeToDateTest.php
    @@ -0,0 +1,33 @@
    +    $plugin = new TimeToDate($config, 'timetodate', []);
    

    Can use $this->plugin here

vijay.mayilsamy’s picture

Hi Ericgsmith,

Thanks for the feedback. Here is the updated patch and interdiff after working on the feedback.

Thanks
Vijay

ericgsmith’s picture

Status: Needs work » Needs review
jfarry’s picture

Status: Needs review » Reviewed & tested by the community

This one is working well for me. How many do we need for an RTBC?

Thank you vijay.mayilsamy :)

mmaranao’s picture

I'd like to submit this patch to add the timetodate plugin against the latest alpha1 release

  • jamesdixon committed 9b30178 on 8.x-1.x authored by mmaranao
    Issue #2976187 by vijay.mayilsamy, sivaramakrishnan, mmaranao,...
jamesdixon’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x-1.x. Thanks everyone!

jamesdixon’s picture

Status: Fixed » Needs review
FileSize
538 bytes

Sorry guys tests needed updating to modern architecture.

Testing this patch.

Status: Needs review » Needs work

The last submitted patch, 14: timetodate-2976187-14.patch, failed testing. View results

jamesdixon’s picture

Status: Needs work » Fixed

Tests fixed in commit: e106cc72be9982592fbafe5011bcc80fa542c09e

Status: Fixed » Closed (fixed)

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