Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to auto fill data for others field types #8976

Merged
merged 3 commits into from Dec 1, 2020

Conversation

kuzmany
Copy link
Member

@kuzmany kuzmany commented Jul 1, 2020

closes #6286
Please be sure you are submitting this against the staging branch.

Q A
Bug fix?
New feature?
Automated tests included?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?
Deprecations?

Description:

This PR added support to auto fill form data for others kind of fields.
We noticed: url, website, date, date time was not supported.

Steps to reproduce the bug:

  1. Create form with email, url, website, date, date time fields
  2. All fields match to contact field and enable Auto fill data for each of them

image

  1. Try submit form
  2. Reload form. You should noticed, just email as filled field.

Steps to test this PR:

  1. Load up this PR
  2. After repeat all steps you should see all fields auto filled

image

@kuzmany kuzmany added ready-to-test PR's that are ready to test enhancement Any improvement to an existing feature or functionality labels Jul 1, 2020
@kuzmany kuzmany closed this Jul 1, 2020
@kuzmany kuzmany force-pushed the fix-populate-field-phone-number branch from 4f5a20c to 6571785 Compare July 1, 2020 03:28
@TravisBuddy
Copy link

Hey @kuzmany,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: 24a13f30-bb4b-11ea-b296-fff192675051

@kuzmany kuzmany reopened this Jul 1, 2020
@TravisBuddy
Copy link

Travis tests have failed

Hey @kuzmany,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

4th Build

View build log

if [ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]; then composer test -- --coverage-clover=coverage.xml && bash <(curl -s https://codecov.io/bash); else composer test; fi
> bin/phpunit --bootstrap vendor/autoload.php --configuration app/phpunit.xml.dist '--coverage-clover=coverage.xml'
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

.............................................................   61 / 1739 (  3%)
...........................................................FF  122 / 1739 (  7%)
FFFF........FF...............................................  183 / 1739 ( 10%)
.............................................................  244 / 1739 ( 14%)
...........................................................SS  305 / 1739 ( 17%)
.............................................................  366 / 1739 ( 21%)
.............................................................  427 / 1739 ( 24%)
..SS.........................................................  488 / 1739 ( 28%)
.............................................................  549 / 1739 ( 31%)
.............................................................  610 / 1739 ( 35%)
.............................................................  671 / 1739 ( 38%)
.............................................................  732 / 1739 ( 42%)
.............................................................  793 / 1739 ( 45%)
............S................................................  854 / 1739 ( 49%)
.............................................................  915 / 1739 ( 52%)
.............................................................  976 / 1739 ( 56%)
............................................................. 1037 / 1739 ( 59%)
............................................................. 1098 / 1739 ( 63%)
............................................................. 1159 / 1739 ( 66%)
............................................................. 1220 / 1739 ( 70%)
............................................................. 1281 / 1739 ( 73%)
............................................................. 1342 / 1739 ( 77%)
............................................................. 1403 / 1739 ( 80%)
............................................................. 1464 / 1739 ( 84%)
............................................................. 1525 / 1739 ( 87%)
............................................................. 1586 / 1739 ( 91%)
............................................................. 1647 / 1739 ( 94%)
............................................................. 1708 / 1739 ( 98%)
...............................                               1739 / 1739 (100%)

Time: 15.98 minutes, Memory: 1.08 GB

There were 8 failures:

1) Mautic\CampaignBundle\Tests\Executioner\Scheduler\Mode\IntervalTest::testRescheduledToDueBeingBeforeSpecificHourRestriction
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'2018-10-18 09:00'
+'2018-10-17 09:00'

/home/travis/build/mautic/mautic/app/bundles/CampaignBundle/Tests/Executioner/Scheduler/Mode/IntervalTest.php:56

2) Mautic\CampaignBundle\Tests\Executioner\Scheduler\Mode\IntervalTest::testRescheduledDueToBeingAfterSpecificHourRestriction
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'2018-10-18 09:00'
+'2018-10-17 09:00'

/home/travis/build/mautic/mautic/app/bundles/CampaignBundle/Tests/Executioner/Scheduler/Mode/IntervalTest.php:91

3) Mautic\CampaignBundle\Tests\Executioner\Scheduler\Mode\IntervalTest::testNotRescheduledDueToSpecificHourRestriction
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'2018-10-18 09:00'
+'2018-10-17 09:00'

/home/travis/build/mautic/mautic/app/bundles/CampaignBundle/Tests/Executioner/Scheduler/Mode/IntervalTest.php:126

4) Mautic\CampaignBundle\Tests\Executioner\Scheduler\Mode\IntervalTest::testRescheduledToSameDayDueToStartHourRestriction
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'2018-10-18 10:00'
+'2018-10-17 10:00'

/home/travis/build/mautic/mautic/app/bundles/CampaignBundle/Tests/Executioner/Scheduler/Mode/IntervalTest.php:161

5) Mautic\CampaignBundle\Tests\Executioner\Scheduler\Mode\IntervalTest::testIsNotRescheduledDueToStartAndStopHourRestrictions
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'2018-10-18 11:00'
+'2018-10-17 11:00'

/home/travis/build/mautic/mautic/app/bundles/CampaignBundle/Tests/Executioner/Scheduler/Mode/IntervalTest.php:196

6) Mautic\CampaignBundle\Tests\Executioner\Scheduler\Mode\IntervalTest::testRescheduledToNextDayDueToStopHourRestriction
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'2018-10-19 10:00'
+'2018-10-18 10:00'

/home/travis/build/mautic/mautic/app/bundles/CampaignBundle/Tests/Executioner/Scheduler/Mode/IntervalTest.php:231

7) Mautic\CampaignBundle\Tests\Executioner\Scheduler\Mode\IntervalTest::testRescheduledToNextDayDueToStartEndHoursAndDayOfWeekRestrictionsWithOnlyEndHourViolation
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'2018-10-19 10:00'
+'2018-10-18 10:00'

/home/travis/build/mautic/mautic/app/bundles/CampaignBundle/Tests/Executioner/Scheduler/Mode/IntervalTest.php:559

8) Mautic\CampaignBundle\Tests\Executioner\Scheduler\Mode\IntervalTest::testContactsAreGrouped
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'2018-10-18 06:00'
+'2018-10-17 06:00'

/home/travis/build/mautic/mautic/app/bundles/CampaignBundle/Tests/Executioner/Scheduler/Mode/IntervalTest.php:651

FAILURES!
Tests: 1739, Assertions: 5116, Failures: 8, Skipped: 5.

Generating code coverage report in Clover XML format ... done

THE ERROR HANDLER HAS CHANGED!
Script bin/phpunit --bootstrap vendor/autoload.php --configuration app/phpunit.xml.dist handling the test event returned with error code 1
TravisBuddy Request Identifier: 2abc2d00-bb4e-11ea-b296-fff192675051

@RCheesley
Copy link
Sponsor Member

@kuzmany some Travis issues here :)

@RCheesley RCheesley added the contacts Anything related to contacts label Jul 23, 2020
@RCheesley
Copy link
Sponsor Member

Bumping to 3.2 due to unresolved Travis issues.

@RCheesley RCheesley modified the milestones: 3.1.0, 3.2 Aug 16, 2020
@codecov
Copy link

codecov bot commented Aug 16, 2020

Codecov Report

Merging #8976 (d8b3c8f) into features (a0bff58) will decrease coverage by 1.85%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff               @@
##             features    #8976      +/-   ##
==============================================
- Coverage       31.84%   29.98%   -1.86%     
+ Complexity      33595    33310     -285     
==============================================
  Files            1946     1938       -8     
  Lines          115966   115395     -571     
==============================================
- Hits            36933    34606    -2327     
- Misses          79033    80789    +1756     
Impacted Files Coverage Δ Complexity Δ
app/bundles/FormBundle/Helper/FormFieldHelper.php 63.54% <100.00%> (+1.58%) 45.00 <0.00> (+4.00)
app/bundles/LeadBundle/Form/Type/TagEntityType.php 0.00% <0.00%> (-100.00%) 1.00% <0.00%> (ø%)
app/bundles/AssetBundle/Form/Type/AssetType.php 0.00% <0.00%> (-98.39%) 6.00% <0.00%> (ø%)
app/bundles/CoreBundle/Form/Type/ConfigType.php 0.00% <0.00%> (-96.12%) 16.00% <0.00%> (-1.00%)
app/bundles/FormBundle/Form/Type/FormType.php 0.00% <0.00%> (-95.39%) 13.00% <0.00%> (ø%)
.../AssetBundle/Controller/Api/AssetApiController.php 0.00% <0.00%> (-93.34%) 8.00% <0.00%> (ø%)
...ampaignBundle/EventListener/CampaignSubscriber.php 7.69% <0.00%> (-92.31%) 6.00% <0.00%> (-3.00%)
...undles/LeadBundle/Form/Type/ModifyLeadTagsType.php 0.00% <0.00%> (-91.31%) 5.00% <0.00%> (ø%)
...les/LeadBundle/Controller/Api/TagApiController.php 0.00% <0.00%> (-90.00%) 3.00% <0.00%> (ø%)
...Form/DataTransformer/ArrayLinebreakTransformer.php 0.00% <0.00%> (-87.50%) 4.00% <0.00%> (ø%)
... and 221 more

@RCheesley
Copy link
Sponsor Member

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The PR contributors have signed the contributors agreement label Aug 26, 2020
@cla-bot
Copy link

cla-bot bot commented Aug 26, 2020

The CLA Bot has been sent on a mission to check against the latest list and will be back shortly with its findings!

@npracht npracht modified the milestones: 3.2.0, 3.2.1, 3.3 Nov 23, 2020
@npracht npracht changed the base branch from staging to features December 1, 2020 08:27
@npracht npracht merged commit 71940e5 into mautic:features Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The PR contributors have signed the contributors agreement contacts Anything related to contacts enhancement Any improvement to an existing feature or functionality ready-to-test PR's that are ready to test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

phone field is not getting autofilled form database while getting values on page
4 participants