Problem/Motivation

Currently Alexanders is getting the phone number from the address field data. However, the address field does not have a phone number, we need to add a separate field in the customer profile.

Proposed resolution

  • Add a telephone number field in the Alexanders Shipment entity.
  • Update the export() function to get the telephone number from the new field instead.

Comments

kkumaren created an issue. See original summary.

kkumaren’s picture

StatusFileSize
new2.83 KB
joshmiller’s picture

Status: Active » Needs work
Issue tags: +Needs tests
joshmiller’s picture

  1. +++ b/src/Entity/AlexandersShipment.php
    @@ -113,6 +113,21 @@ class AlexandersShipment extends ContentEntityBase implements AlexandersShipment
    +   * {@inheritdoc}
    

    This doesn't appear to have been added to the interface.

  2. +++ b/src/Entity/AlexandersShipment.php
    @@ -113,6 +113,21 @@ class AlexandersShipment extends ContentEntityBase implements AlexandersShipment
    +  public function setPhoneNumber($cost) {
    +    $this->set('phone_number', $cost);
    

    $cost

joshmiller’s picture

Status: Needs work » Needs review
StatusFileSize
new4.7 KB
new1.14 KB
new2.59 KB

Status: Needs review » Needs work

The last submitted patch, 5: 3069684-05-tests-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

joshmiller’s picture

Status: Needs work » Needs review
StatusFileSize
new0 bytes
new4.71 KB

turns out the install hook called this field `telephone_number` which means the entity code has to follow suit. If you never actually pull the entity from the database, you wouldn't catch this error.

Test hasn't changed. But we don't technically have a test that would cover this error.

Status: Needs review » Needs work

The last submitted patch, 7: 3069684-07.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

joshmiller’s picture

Status: Needs work » Closed (won't fix)

I'm no longer maintaining this module and am marking the project unsupported, so I'm closing its open issues. If you depend on it and want to take over maintenance, say so on the project page and I'll help hand it over.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.